SnakeYAML Constructor Deserialization Remote Code Execution
CVE-2022-1471 is an unsafe deserialization vulnerability in SnakeYAML versions before 2.0. The Constructor class does not adequately restrict the Java types instantiated during YAML deserialization. Applications processing attacker-controlled YAML through Yaml.load() with an unsafe constructor can instantiate classes identified by explicit YAML type tags. When suitable classes or gadget chains are available in the application's runtime, object construction can trigger arbitrary code execution. Exploitability depends on the application's parsing configuration, input exposure, and available runtime classes.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can execute arbitrary code with the privileges of the application processing the YAML, potentially exposing sensitive application data and credentials, permitting unauthorized data modification, and disrupting service. The presence of SnakeYAML alone does not establish exploitability: attacker-controlled input must reach an unsafe deserialization path, and code execution requires suitable runtime classes or gadgets.
If you can’t patch tonight, do this now.
Use SnakeYAML SafeConstructor when parsing untrusted YAML to prevent arbitrary Java class instantiation. Until a fix is deployed, avoid processing untrusted YAML through unsafe constructors and restrict access to services or workflows that expose vulnerable parsing paths. Network restrictions reduce remote exposure but do not address malicious YAML delivered through other input mechanisms.
Patch, then assume compromise.
Upgrade SnakeYAML to version 2.0 or later and ensure that untrusted YAML is processed with restricted type construction. For applications incorporating SnakeYAML as a bundled dependency, install the vendor-confirmed fixed product release or security update. Specific fixed releases include HCL Workload Automation 10.1.0.3, DynamoDB local 1.25.1 or later in the 1.x branch or 2.5.3 or later in the 2.x branch, and TorchServe 0.8.2. Update affected container images and rebuild dependent images where applicable.
7 exploits validated by Mallory's analysis. Hidden: 2 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
57 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.