Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

leonidas-from-xiv/node-xml2js
master @ 7173c24
3
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Prototype Pollution: 3 prior fixes. Scrutinize any change in this area.
src/parser.coffee: most-fixed (2 issues). Treat as high-risk during review.
3 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Prototype Pollution: The XML parser is highly vulnerable to prototype pollution when raw XML keys (like '__proto__' and 'constructor') are assigned directly to objects during parsing. Multiple overlapping fixes (key blocklists and Object.defineProperty) were required to secure direct property assignments.
Prototype Pollution: A prototype pollution bypass occurred in the parser logic when checking for property existence. Using the 'in' operator allowed inherited prototype properties to influence the parsing flow, requiring a migration to explicit 'hasOwnProperty' checks.