org.yaml:snakeyaml: Improper Restriction of Recursive Entity References in DTDs
CVE-2022-25857 is a high-severity improper restriction of recursive entity references in dtds vulnerability in org.yaml:snakeyaml, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists version 1.31 as the first without the flaw, so updating org.yaml:snakeyaml to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 2.93% chance of exploitation within 30 days, higher than 87% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update org.yaml:snakeyaml to 1.31 or a later version.
- Update Snakeyaml to 1.31 or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Org.yaml:snakeyaml | org.yaml:snakeyaml | 0; before 1.31 | 1.31 |
| Snakeyaml Project | Snakeyaml | before 1.31 | 1.31 |
| Debian | Debian Linux | 10.0 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- NoneNothing can be modified.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | CNA (snyk.io) |
| CVSS 3.1 | 7.5 | High | NVD |
Official description
The package org.yaml:snakeyaml from 0 and before 1.31 are vulnerable to Denial of Service (DoS) due missing to nested depth limitation for collections.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Restriction of Recursive Entity References in DTDs
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.
How developers prevent this class of flaw
- If possible, prohibit the use of DTDs or use an XML parser that limits the expansion of recursive DTD entities.
- Before parsing XML files with associated DTDs, scan for recursive entity declarations and do not continue parsing potentially explosive content.
More Improper Restriction of Recursive Entity References in DTDs vulnerabilities (CWE-776)
Timeline
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- bitbucket.org/snakeyaml/snakeyaml/commits/fc300780da21f4bb92c148bc90257201220cf174Third Party Advisory
- github.com/snakeyaml/snakeyaml/commit/fc300780da21f4bb92c148bc90257201220cf174Third Party Advisory
- security.snyk.io/vuln/SNYK-JAVA-ORGYAML-2806360Exploit, Third Party Advisory
Third-party and government advisories
- lists.debian.org/debian-lts-announce/2022/10/msg00001.htmlMailing List, Third Party Advisory
Technical write-ups (may include proof of concept)
- bitbucket.org/snakeyaml/snakeyaml/issues/525Exploit, Issue Tracking, Third Party Advisory
Other references
Recent Improper Restriction of Recursive Entity References in DTDs vulnerabilities
- 7.5 High severity
- 7.5 High severity
- 9.8 Critical severity
Spotted an error? Tell us.