CVE-2019-15160: Sweet xml Inline DTD Allows XML Bomb Vulnerability
HIGHCVE-2019-15160 is a HIGH (CVSS 7.5) inline dtd allows xml bomb vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) affecting Sweet xml libraries in the Hex ecosystem. The issue involves inline dtd allows xml bomb attack. Remediation is available by upgrading affected packages to version 0.7.0.
CVE-2019-15160 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2019-15160
To remediate this vulnerability, upgrade all affected Sweet xml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade sweet_xml to 0.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for sweet_xml
How to Check if You Are Affected
To determine whether your application is affected by CVE-2019-15160, inspect your project dependencies for Sweet xml:
inspect dependencies for sweet_xml
Analyze the terminal output to locate any version of Sweet xml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), where the product uses xml documents and allows their structure to be defined with a document type definition (dtd), but it does not properly control the number of recursive definitions of entities. In Sweet xml, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2019-15160 Affected Sweet xml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sweet_xml
|
Hex |
< 0.7.0
|
0.7.0
|
References
Frequently Asked Questions
What is CVE-2019-15160?
Which Sweet xml versions are affected?
What version fixes CVE-2019-15160?
Is sweet_xml affected?
What is the CVSS score of CVE-2019-15160?
What CWE is associated with CVE-2019-15160?
How can I check Hex dependencies for CVE-2019-15160?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qpmc-wprv-x746",
"modified" : "2022-04-12T21:31:26Z",
"published" : "2022-04-12T21:31:26Z",
"aliases" : [ "CVE-2019-15160" ],
"summary" : "Inline DTD allows XML bomb attack",
"details" : "The SweetXml (aka sweet_xml) package through 0.6.6 for Erlang and Elixir allows attackers to cause a denial of service (resource consumption) via an XML entity expansion attack with an inline DTD.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Hex",
"name" : "sweet_xml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-15160"
}, {
"type" : "WEB",
"url" : "https://github.com/kbrw/sweet_xml/issues/71"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kbrw/sweet_xml"
}, {
"type" : "WEB",
"url" : "https://hex.pm/packages/sweet_xml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611", "CWE-776" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-04-12T21:31:26Z",
"nvd_published_at" : null
}
}