Skip to content

[Snyk] Security upgrade @xmldom/xmldom from 0.8.15 to 0.9.12 - #4638

Open
chelojimenez wants to merge 1 commit into
mainfrom
snyk-fix-9cc9fd167514fe237fe63280ba281179
Open

chelojimenez wants to merge 1 commit into
mainfrom
snyk-fix-9cc9fd167514fe237fe63280ba281179

Conversation

@chelojimenez

@chelojimenez chelojimenez commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • sdk/package.json

Vulnerabilities that will be fixed with an upgrade:

Issue
high severity Regular Expression Denial of Service (ReDoS)
SNYK-JS-XMLDOMXMLDOM-19498551

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Regular Expression Denial of Service (ReDoS)


Note

Medium Risk
Crossing 0.8→0.9 may change XML parsing behavior on the SVG dimension path even though the diff is only a version pin; worth a quick regression check on malformed SVG handling.

Overview
Bumps the @xmldom/xmldom dependency in sdk/package.json from ^0.8.13 to ^0.9.12. This is a Snyk-driven security fix for a high-severity ReDoS issue (SNYK-JS-XMLDOMXMLDOM-19498551).

There are no application code changes—only the declared npm version. The library is used on the Node entry path for SVG XML parsing (xmldomParseXml / openai-readiness), not in the browser bundle.

Reviewed by Cursor Bugbot for commit 921d8d5. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Updates @xmldom/xmldom from ^0.8.13 to ^0.9.12 in the SDK to fix a high-severity Regular Expression Denial of Service vulnerability.

Written for commit 921d8d5. Summary will update on new commits.

Review in cubic

@chelojimenez

Copy link
Copy Markdown
Contributor Author

Merge Risk: High

The upgrade of @xmldom/xmldom from version 0.8.15 to 0.9.12 introduces significant breaking changes that require code modifications.

Key Breaking Changes:

  • Mandatory mimeType: The mimeType argument in DOMParser.parseFromString(xml, mimeType) is now mandatory. The library no longer automatically detects whether to apply XML or HTML parsing rules based on namespaces. You must explicitly provide a mimeType like 'text/xml' or 'text/html'.

  • Stricter Error Handling: The parser is much stricter and will now throw a ParseError for non-well-formed XML that might have been silently accepted in previous versions. Code that relied on lenient parsing of invalid documents is likely to break.

  • HTML Parsing Behavior: Support for automatic self-closing tags in HTML has been removed. If you were parsing HTML, you need to verify that your documents are well-formed according to the new, stricter rules.

  • removeChild API: The removeChild API has been updated to align with specifications and may now throw a DOMException in cases where it previously did not.

Recommendation:
Before merging, review all usages of DOMParser.parseFromString and ensure a mimeType is explicitly provided. Thoroughly test your application's XML and HTML parsing functionality, paying close attention to error handling, as documents that were previously parsed successfully may now cause exceptions.

Source: Release notes

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cursor

cursor Bot commented Sep 2, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_ed8df85d-e2b6-4b82-b9e8-35fe5321a0b2)

@chelojimenez

Copy link
Copy Markdown
Contributor Author

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Internal preview

Preview URL will appear in Railway after the deploy finishes.
Deployed commit: 34a588e
PR head commit: 921d8d5
Backend target: staging fallback.
Access is employee-only in non-production environments.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="sdk/package.json">

<violation number="1" location="sdk/package.json:181">
P1: Because this workspace uses the root lockfile, this manifest change makes reproducible installs fail and leaves CI unable to install the SDK. Regenerate and commit `package-lock.json` with `@xmldom/xmldom` 0.9.12.</violation>

<violation number="2" location="sdk/package.json:181">
P1: Updating only the SDK leaves the inspector able to install and load the vulnerable 0.8.x copy of `@xmldom/xmldom`. Bump the inspector's direct dependency as well, then regenerate the lockfile so the security fix covers the workspace runtime.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread sdk/package.json
"@noble/hashes": "^2.3.0",
"@openrouter/ai-sdk-provider": "^2.2.0",
"@xmldom/xmldom": "^0.8.13",
"@xmldom/xmldom": "^0.9.12",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Because this workspace uses the root lockfile, this manifest change makes reproducible installs fail and leaves CI unable to install the SDK. Regenerate and commit package-lock.json with @xmldom/xmldom 0.9.12.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At sdk/package.json, line 181:

<comment>Because this workspace uses the root lockfile, this manifest change makes reproducible installs fail and leaves CI unable to install the SDK. Regenerate and commit `package-lock.json` with `@xmldom/xmldom` 0.9.12.</comment>

<file context>
@@ -178,7 +178,7 @@
     "@noble/hashes": "^2.3.0",
     "@openrouter/ai-sdk-provider": "^2.2.0",
-    "@xmldom/xmldom": "^0.8.13",
+    "@xmldom/xmldom": "^0.9.12",
     "ai": "^6.0.141",
     "ajv": "^8.17.1",
</file context>

Comment thread sdk/package.json
"@noble/hashes": "^2.3.0",
"@openrouter/ai-sdk-provider": "^2.2.0",
"@xmldom/xmldom": "^0.8.13",
"@xmldom/xmldom": "^0.9.12",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Updating only the SDK leaves the inspector able to install and load the vulnerable 0.8.x copy of @xmldom/xmldom. Bump the inspector's direct dependency as well, then regenerate the lockfile so the security fix covers the workspace runtime.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At sdk/package.json, line 181:

<comment>Updating only the SDK leaves the inspector able to install and load the vulnerable 0.8.x copy of `@xmldom/xmldom`. Bump the inspector's direct dependency as well, then regenerate the lockfile so the security fix covers the workspace runtime.</comment>

<file context>
@@ -178,7 +178,7 @@
     "@noble/hashes": "^2.3.0",
     "@openrouter/ai-sdk-provider": "^2.2.0",
-    "@xmldom/xmldom": "^0.8.13",
+    "@xmldom/xmldom": "^0.9.12",
     "ai": "^6.0.141",
     "ajv": "^8.17.1",
</file context>

This branch had an error being deployed

1 failed deployment
preview-pr-4638 — 921d8d50 Deployed Sep 2, 2026 by chelojimenez via upsert-preview #16893
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants