Vulnerability DatabaseGHSA-9phx-3fcw-32vf

GHSA-9phx-3fcw-32vf: 
JavaScript vulnerability analysis and mitigation

Affected versions: saxen 12.0.0 (run). Same code expected from 11.1.0 (not run). Bug. The README says chunks may split anywhere, even inside a tag or attribute. In parse() (lib/parser.js, tag-end scan), a quoted value is skipped with:

if (v === 34) { q = xml.indexOf('"', x + 1); x = q !== -1 ? q : x; }

(and the same for '). When the closing quote is not yet in the buffer (q === -1), x stays inside the value and the next > inside the value ends the tag. In streaming mode the scan should return the remainder xml.substring(i) and wait for the next chunk, as it already does when the buffer ends inside a tag. Steps to reproduce (run on 12.0.0, Node.js v24.22.1, Windows 11):

import { Parser } from 'saxen'
function run(feed) {
  const ev = []
  const p = new Parser()
  p.on('openTag', (n, g) => ev.push('open:' + n + JSON.stringify(g())))
  p.on('closeTag', (n) => ev.push('close:' + n))
  p.on('warn', (w) => ev.push('warn:' + w.message))
  p.on('error', (e) => ev.push('error:' + e.message))
  feed(p)
  return ev.join(' ')
}
console.log(run((p) => p.parse('<a v="x><b/>y"/>')))
console.log(run((p) => { p.write('<a v="x>'); p.write('<b/>y"/>'); p.end() }))

Observed:

open:a{"v":"x><b/>y"} close:a
warn:missing closing quotes open:a{} open:b{} close:b error:unexpected end of file

Expected: both runs emit open:a{"v":"x><b/>y"} close:a. (With <a v="x>y"><b/></a> the chunked run also differs: the v attribute is lost.) The single-quote form behaves the same. Impact: the same bytes parse into different elements and attributes depending on where the chunks split. A document can hide or invent elements for a consumer that reads in chunks while a validator that reads the whole document sees something else. In a consumer that builds structures from tag attributes this can turn a small input into large allocations. I found no memory corruption or code execution. Suggested fix: in the tag-end scan, when streaming is true and the quote has no match in the buffer, return xml.substring(i); keep the current behaviour when not streaming. A regression test could feed each test document whole and through every two-way split, and assert identical events. (Reference: read-excel-file 9.3.20 vendors the same parser code in modules/saxen/parser.js; I am not reporting that anywhere before you reply.)


Source: NVD

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-3qjc-mqvq-rch9HIGH7.6
  • JavaScript logoJavaScript
  • @mikro-orm/knex
NoYesNov 27, 2026
GHSA-j4pj-2xg4-35f6HIGH7.4
  • JavaScript logoJavaScript
  • @mikro-orm/mariadb
NoYesNov 27, 2026
GHSA-vrvp-5qx2-7xcmMEDIUM6.5
  • JavaScript logoJavaScript
  • @mikro-orm/knex
NoYesNov 27, 2026
GHSA-9phx-3fcw-32vfLOW3.7
  • JavaScript logoJavaScript
  • saxen
NoYesNov 27, 2026
GHSA-288x-p79m-78v5LOW3.7
  • JavaScript logoJavaScript
  • @mikro-orm/knex
NoYesNov 27, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management