Skip to content

CVE-2026-93749 source-map-js: Event-loop DoS via unvalidated indexed source-map section offsets (1.2.1 -> 1.2.2) - #1168

Merged
vharseko merged 1 commit into
masterfrom
dependabot/npm_and_yarn/openam-ui/openam-ui-js-sdk/source-map-js-1.2.2
Oct 12, 2026
Merged

vharseko merged 1 commit into
masterfrom
dependabot/npm_and_yarn/openam-ui/openam-ui-js-sdk/source-map-js-1.2.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Bumps source-map-js from 1.2.1 to 1.2.2 in openam-ui/openam-ui-js-sdk (package-lock.json only), clearing Dependabot alert #363. openam-ui-js-sdk is the only lock file in the repository that resolves source-map-js.

Advisory

CVE-2026-93749 / GHSA-68fv-2mgg-jv7q (fixed in 1.2.2) — Improper validation of specified index, position, or offset in input (CWE-1284). An indexed source map ({ "sections": [...] }) carries a per-section offset.line that was never validated. Fed through SourceNode.fromStringWithSourceMap, it drives a line-padding loop that pushes one newline per line up to that offset, so a tiny map with a huge offset.line blocks the event loop for an attacker-chosen time, and 1e999 (which JSON.parse yields as Infinity) ends in RangeError: Invalid array length. The fix (7rulnik/source-map-js#79) closes four amplification paths reachable from untrusted map input:

  • section offsets must be non-negative safe integers, and offset.line is capped at 10,000,000 including the summed offsets of nested sections;
  • the IndexedSourceMapConsumer sources getter, which was exponential in nesting depth, reads each section once;
  • _serializeMappings builds large ; gaps as one flat string instead of a rope that could exhaust the heap;
  • fromStringWithSourceMap stops padding once the generated code is exhausted.
Severity Affected Fixed in
GHSA-68fv-2mgg-jv7q High — CVSS 3.1 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) >= 1.0.0, < 1.2.2 1.2.2

Availability-only: no code execution, no data exposure.

Impact on OpenAM

None at runtime, none in practice in the build. source-map-js is a transitive development dependency of openam-ui-js-sdk (dev: true), pulled in by postcss 8.5.23 (under vite 8.0.16), sass 1.93.2 and css-tree 3.1.0 (under jsdom via cssstyle and @asamuzakjp/dom-selector). No OpenAM source imports it, and it does not end up in the SDK bundle (target/lib, target/app) or the WAR — the runtime dependencies are only react, react-dom and react-router.

The Maven build reaches these tools through npm run build (Vite, which compiles src/index.scss through Sass) and npm run test:run (Vitest with jsdom). What they read is the repository's own source — src/index.scss has no @import / @use — and the packages pinned in the lock file, never a source map from outside, so the attacker-supplied indexed source map the advisory requires does not exist here. The bump takes the development toolchain out of the vulnerable range.

Change

The node_modules/source-map-js entry in openam-ui/openam-ui-js-sdk/package-lock.json: 1.2.1 → 1.2.2 (version, resolved, integrity). package.json is untouched — postcss asks for ^1.2.1, css-tree for ^1.0.1 and sass for >=0.6.2 <2.0.0, all satisfied by 1.2.2. No code change; 1.2.2 additionally stops crashing in browsers whose CSP script-src forbids unsafe-eval (7rulnik/source-map-js#29), which does not apply to a build-time dependency.

Verified:

  • the lock file integrity matches npm view [email protected] dist.integrity
  • node_modules/source-map-js is the only source-map-js entry in this lock file

References

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Oct 11, 2026
@vharseko vharseko changed the title Bump source-map-js from 1.2.1 to 1.2.2 in /openam-ui/openam-ui-js-sdk CVE-2026-93749 source-map-js: Event-loop DoS via unvalidated indexed source-map section offsets (1.2.1 -> 1.2.2) Oct 11, 2026
@vharseko vharseko added the security Security fix or hardening (CVE, GHSA, XSS/CSRF/SSRF) label Oct 11, 2026
@vharseko
vharseko merged commit 59aec06 into master Oct 12, 2026
16 checks passed
@vharseko
vharseko deleted the dependabot/npm_and_yarn/openam-ui/openam-ui-js-sdk/source-map-js-1.2.2 branch October 12, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code security Security fix or hardening (CVE, GHSA, XSS/CSRF/SSRF)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant