CVE-2022-1471
Published: 01 December 2022
Summary
CVE-2022-1471 is a high-severity Improper Input Validation (CWE-20) vulnerability in Snakeyaml Project Snakeyaml. Its CVSS base score is 8.3 (High).
Operationally, ranked in the top 0.1% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
Deeper analysis
SnakeYaml's Constructor() class permits unrestricted instantiation of arbitrary Java types during YAML deserialization, exposing any application that parses attacker-controlled YAML content to remote code execution. The flaw is tracked as CVE-2022-1471, carries a CVSS 3.1 score of 8.3, and is rooted in improper input validation and unsafe deserialization (CWE-20, CWE-502). It affects all versions prior to 2.0 that rely on the default Constructor rather than SafeConstructor.
An attacker with the ability to supply malicious YAML—typically over a network with low complexity and requiring only low privileges—can trigger instantiation of classes that lead to arbitrary code execution on the target. Exploitation succeeds when the application deserializes the untrusted content without type restrictions, allowing construction of objects that invoke dangerous methods or load attacker-controlled classes.
Public advisories, including those from Atlassian and the SnakeYaml project, explicitly recommend migrating to SafeConstructor for untrusted input and upgrading to SnakeYaml 2.0 or later. Several downstream products, such as PyTorch Model Server, have published coordinated fixes or configuration guidance referencing the same issue.
The CVE maintains an EPSS score near 0.94, indicating sustained exploitation interest across multiple affected libraries and frameworks referenced in the disclosed URLs.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2022-7690
Vulnerability details
SnakeYaml's Constructor() class does not restrict types which can be instantiated during deserialization. Deserializing yaml content provided by an attacker can lead to remote code execution. We recommend using SnakeYaml's SafeConsturctor when parsing untrusted content to restrict deserialization. We recommend…
more
upgrading to version 2.0 and beyond.
- CWE(s)
Related Threats
No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.
Affected Assets
Mitigating Controls
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
Security testing and evaluation at multiple SDLC stages directly detects missing or flawed input validation, with the required remediation process ensuring fixes are applied.
Directly implements checks on information inputs to reject invalid data before processing.
Penetration testing supplies malicious serialized objects, detecting unsafe deserialization and supporting corrective actions.
Security testing and developer training directly verify and enforce proper input validation, reducing exploitability of injection and malformed-data weaknesses.
Untrusted serialized data can be deserialized and observed inside the chamber, blocking gadget-chain exploitation outside the sandbox.
Identifies and blocks malicious code introduced through deserialization of untrusted data at system boundaries.
Integrity verification of serialized information can detect tampering before deserialization occurs.
Spam protection mechanisms perform filtering and detection on inbound/outbound messages, directly compensating for missing or weak input validation of unsolicited content.