fix(security): update vulnerability-updates [security] - #1434
Merged
Conversation
✅ Deploy Preview for openfeature ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.4.12→3.4.134.3.0→4.3.111.15.0→11.16.1DOMPurify: IN_PLACE hook removal leaves a detached subtree executable, causing XSS
GHSA-55q2-fjhq-7xh7
More information
Details
Summary
During
IN_PLACEsanitization, a hook that removes an element can leave that element's detached descendants executable. A descendant image can retain its attacker-providedonloadhandler and fire aftersanitize()returns, even though the returned root is clean and the image remains disconnected from the document.Details
In DOMPurify 3.4.12,
_sanitizeElements()insrc/purify.ts:1862-1904runs thebeforeSanitizeElementsoruponSanitizeElementhook and returns immediately when the hook detached the current node. The return does not call_neutralizeSubtree(currentNode).The detached subtree is not added to
DOMPurify.removed, so the post-walkIN_PLACEneutralization cannot reach it. If the browser queued a resource event while the application constructed the detached dirty root, a descendant can therefore retain its handler and execute after sanitization.The hook only rejects the containing element and does not add or approve the event handler. DOMPurify's ordinary removal path de-arms the same queued event; only the hook-detachment early return skips the existing subtree neutralization.
PoC
Load the published
dompurify@3.4.12dist/purify.jsbefore this script in Chromium:sanitize()returns with no handler execution and the returned root contains only the safediv. After the event loop advances, the original image remains disconnected but its retainedonloadchanges the page toXSS after sanitize.As the claim-matched control, use the same detached input with
ALLOWED_TAGS: ['div', '#text']and no hook. DOMPurify's ordinary removal path removes the original image's handler, the returned root is still<div>safe</div>, and the marker does not fire.Impact
In an application that uses
IN_PLACEwith the documented element-removal hook pattern, an attacker who can supply HTML can execute JavaScript in the integrating application's origin after the application sanitizes and renders that content.The required non-default configuration is
IN_PLACEplus a hook that removes a containing element. The hook does not add or approve the event handler, and the dirty root never needs to be connected before sanitization.Suggested fix
Reuse the existing
_neutralizeSubtree(currentNode)helper before returning from both hook-detachment branches in_sanitizeElements(). Add regressions forbeforeSanitizeElementsanduponSanitizeElementthat retain a reference to a descendant resource element and verify that its event handler is removed after the hook detaches its ancestor.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026-59870 fix not backported
GHSA-5p4m-2wfm-xmqj
More information
Details
Quadratic CPU consumption in
!!omapresolution (js-yaml 3.x and 4.x)Summary
resolveYamlOmap()enforces key uniqueness for!!omapsequences with a linearscan (
objectKeys.indexOf(...)) inside the per-element loop, making resolutionO(n²) in the number of entries. A modestly sized YAML document therefore
consumes disproportionate CPU inside
yaml.load(), giving a denial of serviceagainst any consumer that parses untrusted YAML.
!!omapis registered in the default schema(
lib/schema/default.js→require('../type/omap')), so a plainyaml.load(untrustedInput)with no options is affected — no custom schema ornon-default configuration is required.
This is the same weakness as CVE-2026-59870 / GHSA-724g-mxrg-4qvm, which was
fixed in the 5.x line in 5.2.1. That fix was never backported: both currently
maintained legacy lines still carry the original implementation.
Affected versions
objectKeys.indexOf(pairKey)atlib/type/omap.js:29objectKeys.indexOf(pairKey)atlib/type/omap.js:30Set)Both figures are the newest release of each line at the time of writing, so
this is not a "you are on an old version" issue.
Details
lib/type/omap.js(js-yaml 4.3.0):objectKeysgrows by one element per entry, andArray.prototype.indexOfis alinear scan, so resolving an
n-entry!!omapperforms roughly1 + 2 + … + ncomparisons — quadratic inn. The work happens synchronouslyinside
yaml.load(), blocking the event loop for its whole duration.The 5.x line already solves exactly this by tracking seen keys in a
Set(
src/tag/sequence/omap.ts):Proof of concept
Measured (node v20.20.2, default heap, no flags)
js-yaml 4.3.0
js-yaml 3.15.0
Runtime grows by a factor of ~4 for each doubling of
n, which is thesignature of O(n²) (linear growth would be ~2×).
Scaling further: a 2.48 MB document with 150,000 entries blocked
yaml.load()for 10.8 seconds.Impact
Any service that parses attacker-influenced YAML with js-yaml 3.x or 4.x can be
stalled with a small input. Because the loop is synchronous, a single request
blocks the Node.js event loop and stalls every other request in the process —
so the amplification is per-process, not just per-request.
Suggested severity: consistent with CVE-2026-59870 (the same weakness in
5.x), i.e. Availability-only impact, network attack vector, no privileges or
user interaction required.
Suggested fix
Mirror the 5.x fix — replace the linear scan with a
Set:This preserves the existing duplicate-key rejection semantics exactly while
making resolution O(n). A
maxOmapLength-style cap would also work, but theSetmatches what 5.x already ships and requires no new option.References
lib/type/omap.js(3.x, 4.x) — the affected resolverlib/schema/default.js— registers!!omapin the default schemaDiscovery
Found by an automated static-analysis and executed-proof-of-concept scanner run
against js-yaml 4.2.0, then manually verified against 3.15.0 and 4.3.0 by
executing the proof of concept above. All timings in this report were measured
on the current releases of each line, not on the version originally scanned.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Mermaid Architecture diagrams are vulnerable to prototype pollution
CVE-2026-71437 / GHSA-3rrr-jr9j-h3q3
More information
Details
Rendering an untrusted
architecture-betadiagram lets the diagram author write an arbitrary property with the valuehorizontalorverticalontoObject.prototype. A group id of__proto__is accepted as a valid parent.Impact
Any code in the same realm that reads a property of that name from an arbitrary object, or enumerates an object with bare
for...in, observes the injected value (which can only be the stringhorizontalorvertical.This may mean corrupted option/config defaults, bypassed truthiness checks, causing denial of service or logic corruption in the embedding application.
Because the injected value cannot be an object or function, this is not directly exploitable for remote code execution.
PoC
The vulnerable write was introduced in commit cb0a4703bdf01d47508bde1c08aa9a980d70bc20 and first shipped in
mermaid@11.5.0. The lines are unchanged in every release since.Patches
This has been patched by mermaid-js/mermaid@99af3fc, released in Mermaid v11.16.1
Workarounds
There are no known workarounds. Please update to a patched version.
References
Are there any links users can visit to find out more?
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:H/SI:H/SA:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Mermaid radar diagrams are vulnerable to DoS
CVE-2026-71439 / GHSA-rhh3-jpg6-66xh
More information
Details
Impact
Mermaid radar diagrams allow arbitrary large values for
ticks, which can cause high CPU usage, freezing the webpage/JavaScript process for long periods of time, until the process is eventually killed due to OOM/running out of memory.Proof-of-concept
radar-beta axis a, b curve c {1, 1} ticks 1000000000Patches
Has the problem been patched? What versions should users upgrade to?
This problem has been patched by mermaid-js/mermaid@59b22fa, which was released in Mermaid v11.16.1
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
There are no known workarounds without updating to a patched version of mermaid.
References
Are there any links users can visit to find out more?
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Mermaid allows CSS injection applying to sibling elements of the diagram
CVE-2026-50159 / GHSA-6x64-9x62-f2gx
More information
Details
Summary
Mermaid does not fully restrict CSS to the rendered SVG subtree. Although selectors are prefixed with
#mermaid-X, sibling (~and+) combinators can still escape the Mermaid container and inject styles to DOM elements adjacent to the diagram<svg>.Most users of mermaid would not be affected by this, as mermaid adds its
<svg>as an only child of it's parent element. However, you may be affected if you manually insert the<svg>(or other elements) into the DOM yourself.Details
Mermaid namespaces CSS through with a middleware intended to scope all rules to the diagram's SVG element. CSS nesting expands
& ~ * { ... }to#svgId ~ *, which selects all sibling elements following the SVG in the DOM, outside the diagram boundary.Impact
An attacker able to supply diagram source to a page (e.g., user-generated content rendered by Mermaid) could inject CSS rules affecting sibling elements to the diagram
<svg>on the host page. This can be used for UI redressing, hiding content, conditional CSS-based probing, or phishing-style visual manipulation.JavaScript execution is not possible via this vector.
Patches
This has been patched in mermaid-js/mermaid@12d472c and released in Mermaid v11.16.1.
A backport has been made for the v10 branch in 7e83f1533318b307764d961906a73377266f4c5e and was released in Mermaid v10.9.8
Workarounds
If you are inserting the
<svg>into the DOM yourself, you can wrap it in an element with no other children, e.g.<div><svg>...</svg></div>orelement.innerHTML = svg. Alternatively, you can usemermaid.run()ormermaid.initialize()which will do this for you.Setting "securityLevel": "sandbox" will also prevent this, or setting the
secureconfig value in the mermaid config to avoid allowing diagrams to modifyfontFamily,themeCSS,altFontFamily, andthemeVariables.To test, you can try using a
themeCSSwith& + * { /* my CSS here */}and see if it's applied outside of your mermaid<svg>.References
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Mermaid configuration APIs allow prototype pollution
CVE-2026-71438 / GHSA-c4c3-pg64-4m4v
More information
Details
Summary
Mermaid's configuration setters (
mermaid.initialize,mermaidAPI.setConfig, andmermaidAPI.updateSiteConfig) merge the caller-supplied configuration object into Mermaid's internal config using theassignWithDepthdeep-merge helper that is vulnerable to prototype pollution.Because these APIs are intended to receive trusted configuration supplied by the application integrating Mermaid, Mermaid assesses the practical risk as low. The vulnerability is only reachable if an application forwards attacker-controlled data directly into one of these configuration entry points, which is outside their documented usage.
User-controlled configuration (e.g. configuration in diagram code using
%%{init: {}}%%or YAML frontmatter) are already protected from prototype pollution.Patches
This has been patched in mermaid-js/mermaid@2cd6dcf and released in Mermaid v11.16.1.
A backport has been made for the v10 branch in c34b07a0815842327e70794d69b0c8c5a1e2a956 and was released in Mermaid v10.9.8
Impact
Mermaid believes it's unlikely that anybody is impacted, as these functions are configuration entry points expected to receive trusted, developer-controlled values as they can modify other security-relevant configuration.
Workarounds
Don't pass user-controlled data to the
mermaid.initialize,mermaidAPI.setConfig, andmermaidAPI.updateSiteConfigfunctions. Instead, users can use%%{init: {}}%%or YAML frontmatter in diagrams.Reporters
Severity
CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:N/VI:L/VA:L/SC:H/SI:H/SA:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Mermaid XY Charts are vulnerable to an infinite loop DoS
CVE-2026-71436 / GHSA-2v8p-3f2j-5mp7
More information
Details
Impact
Mermaid XY Charts are vulnerable to an infinite loop DoS attack in the
setXAxisRangeData(), when configuring an X-Axis with invalid parameters.As each loop appends an element to an array, this would generally only cause an
RangeError: Invalid array lengthto appear after a few seconds, but may cause the page/JavaScript process to crash due to memory exhaustion, depending on the environment.Proof-of-concept
Patches
This has been patched in mermaid-js/mermaid@630aa7e and released in Mermaid v11.16.1.
A backport has been made for the v10 branch in ef60adc837d9d5107af21285f01e83dea309bd0a and was released in Mermaid v10.9.8
Workarounds
There are no known workarounds. Please update to the latest version or apply the patch.
References
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
cure53/DOMPurify (dompurify)
v3.4.13: DOMPurify 3.4.13Compare Source
IN_PLACEsanitization, thanks @koyokrownerDocumentduringIN_PLACE, thanks @AkshayjainGnodeca/js-yaml (js-yaml)
v4.3.1Compare Source
mermaid-js/mermaid (mermaid)
v11.16.1Compare Source
Patch Changes
#8022
12d472cThanks @aloisklink! - fix: handle CSS sibling combinators in compileCSS#8022
2cd6dcfThanks @aloisklink! - fix: increase protections against prototype pollutionUser-controlled input already has protections against prototype pollution.
Fixes: GHSA-c4c3-pg64-4m4v
#8022
99af3fcThanks @aloisklink! - fix(architecture): useMaps andSets to store groups/servicesServices are now rendered in the order they are defined and more service IDs
are now supported.
#8022
2cd6dcfThanks @aloisklink! - deprecate: Deprecate themermaidAPI.setConfig()functionCalling this function has no observable effect, as the next time a
render()orparse()is called, thecurrentConfigis cleared.#8022
630aa7eThanks @aloisklink! - fix(xychart): support zero-width x-axis ranges#8022
59b22faThanks @aloisklink! - fix(radar): limit number of ticks to 32Setting a ticks value higher than this would only show 32 ticks.
v11.16.0Compare Source
Minor Changes
#7535
ea1c48fThanks @ragelink! - feat(cynefin): Adds the Cynefin framework as a new diagram type (beta) to Mermaid (available ascynefin-beta). The Cynefin framework, created by Dave Snowden, is a decision-making framework that categorizes problems into five complexity domains, widely used in agile, incident management, strategy, and organizational design.#7721
f45cc2cThanks @notionparallax! - feat(treeView): add box-drawing character input support for treeView diagrams#7550
f1f4d45Thanks @DominicBurkart! - feat(xychart): add per-point text labels for xychart line plots#7527
b4d0442Thanks @notionparallax! - feat(treeView): Extends the existing treeView-beta diagram with features useful for representing file/directory structures.#7793
a6f097dThanks @SSDWGG! - feat(er): support optional ER attribute types with a?suffix#7772
37f2e36Thanks @devareddy05! - feat(gantt): support multipleexcludes/includeslines so long exclusion lists can be split into commented groups (#6270)#7708
4e63e9dThanks @txmxthy! - feat(architecture): addalign row|column {ids…}directive to architecture-beta diagrams so authors can declare horizontal or vertical alignment of services explicitly.#7760
05223beThanks @ngdaniels! - feat(pie): Enhance Pie Chart - Enable donut chart, Set legend position, and highlight slice#7251
216e4e9Thanks @ydah! - feat(railroad): Add support for Railroad Diagrams (Syntax Diagrams) with four input syntaxes: IR (railroad-beta), EBNF (railroad-ebnf-beta), ABNF (railroad-abnf-beta), and PEG (railroad-peg-beta).#7774
e5c75e6Thanks @ngdaniels! - feat(xychart): enable rotate label on X-axis#7791
974fa7bThanks @knsv-bot! - feat(swimlane): add swimlane as a standalone diagram type with a dedicated layered orthogonal layout algorithmPatch Changes
#7744
633c261Thanks @ashishjain0512! - fix(architecture): addarchitecture.seedconfig option to make architecture diagrams render deterministically. Resolves #7729.#7732
c8ba156Thanks @rkdfx! - fix: tolerate leading horizontal whitespace before YAML frontmatter delimiters. Closes #7613#7314
4e4e6c4Thanks @darshanr0107! - fix(flowchart): Prevent crash when flowchart node shape is undefined#7762
cfd2391Thanks @Dharya-dev! - fix(class): support styling and callbacks for generic classes#7284
c1f116dThanks @darshanr0107! - fix(gantt): Render gantt vertical markers without affecting row layout or chart height#7786
72fbab1Thanks @knsv-bot! - fix(er): allow special characters (e.g. dots) in ER diagram attribute names and types by escaping them with backticks#7672
4887e97Thanks @sjackson0109! - fix(flowchart): respect per-subgraph direction keyword in Dagre layout. Fixes #4648#7734
a4c1e50Thanks @OfirHaf! - fix(block): read block padding and sanitize config dynamically instead of at module load time#7674
cc75089Thanks @cyphercodes! - fix(block): respect current DOMPurify config when sanitizing labels#7711
be2e282Thanks @Jinacker! - fix(flowchart): render flowchart and state self-loop edges as a single SVG path.#7781
d945968Thanks @Dharya-dev! - fix(radar): align axis labels based on angular position to prevent clipping#7661
2f5e9e8Thanks @nabila401! - fix(venn): fix 3-circle venn diagram union rendering#7780
8dcdce4Thanks @Dharya-dev! - fix(xychart): truncate plot data to match x-axis category count#7235
1bbc189Thanks @darshanr0107! - fix: Support consecutive LaTeX in node text#7247
365c1b1Thanks @darshanr0107! - fix(treeView): Ensure treemap labels render correctly in large nested diagrams#7754
06a32b7Thanks @palgunatm66! - fix(sequence): sequenceDiagram rect backgrounds using theme-aware fallback colors#7693
afaf306Thanks @dull-bird! - fix(quadrant-chart): allow CJK, emoji, Latin-1 accented characters, and other non-ASCII text in unquoted axis/quadrant/point labels. Fixes #7120.#7751
79e97cdThanks @puneetdixit200! - fix(state): render state diagram click tooltips with mermaidTooltip#7570
c2305dfThanks @PinguinsRule! - fix(state): Fix invalid syntax between state and '{'#7758
a4a250bThanks @mk24x7! - fix(venn): render labeled higher-arity unions when the underlying pairwise unions are not declared. Resolves #7656.Updated dependencies [
ea1c48f,b4d0442,4e63e9d,216e4e9]:Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.