[GHSA-6433-x5p4-8jc7] libxmljs vulnerable to type confusion when parsing specially crafted XML #5720
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.
Updates
Comments
Title: libxmljs vulnerable to type confusion when parsing specially crafted XML
Description:
libxmljs is vulnerable to a type confusion vulnerability when processing malicious XML content. The issue occurs when:
attrs()
on a parsed nodeattrs()
Impact:
The vulnerability stems from improper type handling when manipulating node attributes, allowing memory corruption that could be exploited to achieve the above impacts.
References:
https://nvd.nist.gov/vuln/detail/CVE-2024-34391
libxmljs/libxmljs#645
https://research.jfrog.com/vulnerabilities/libxmljs-attrs-type-confusion-rce-jfsa-2024-001033988
libxmljs/libxmljs@[COMMIT_HASH] (add the actual commit hash that fixed the issue)
Affected Products:
Ecosystem: npm
Package name: libxmljs
Affected versions: <= 1.0.11
Patched versions: >= 1.0.12
Severity: Critical (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N)
Weaknesses:
CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')