CVE-2022-41854 — snakeyaml
MEDIUMCVE-2022-41854 is a medium-severity (CVSS 5.8) CWE-121 vulnerability in org.yaml:snakeyaml. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for org.yaml:snakeyaml — see the affected versions and patch details below.
Stack Overflow in Snakeyaml
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.yaml:snakeyamlReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Those using Snakeyaml to parse untrusted YAML files may be vulnerable to Denial of Service attacks (DOS). If the parser is running on user supplied input, an attacker may supply content that causes the parser to crash by stack overflow. This effect may support a denial of service attack.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.yaml:snakeyaml | all versions | 1.32org.yaml:snakeyaml:1.32 |
Affected Products
fedorafedoraprojectsnakeyamlsnakeyaml_projectResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.yaml:snakeyaml, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.yaml:snakeyaml to 1.32 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-41854 is resolved across your whole dependency graph.
Workarounds
Stop feeding it untrusted input: reject or quarantine files and payloads from unverified sources until you can upgrade, restrict accepted formats to the ones you actually need, and run the parsing or decoding step in a least-privileged sandbox or short-lived worker so a crash or corrupted read cannot reach the rest of the process.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Migration Toolkit for Runtimes 1 on RHEL 8 | mtr/mtr-web-container-rhel8:1.1-7 | RHSA-2023:3373 |
| MTA-6.2-RHEL-9 | mta/mta-windup-addon-rhel9:6.2.0-11 | RHSA-2023:4627 |
| OCP-Tools-4.12-RHEL-8 | ocp-tools-4/jenkins-agent-base-rhel8:v4.12.0-1683009711 | RHBA-2023:3300 |
| Red Hat AMQ Clients | dev-java-snakeyaml | RHSA-2023:7697 |
| Red Hat build of Eclipse Vert.x 4.3.7 | dev-java-snakeyaml | RHSA-2023:0577 |
| Red Hat Fuse 7.12 | dev-java-snakeyaml | RHSA-2023:3954 |
| Red Hat JBoss Enterprise Application Platform | org.yaml/snakeyaml:1.33.0.SP1-redhat-00001 | RHSA-2023:1516 |
| Red Hat JBoss Enterprise Application Platform 7.4 for RHEL 8 | eap7-snakeyaml-0:1.33.0-2.SP1_redhat_00001.1.el8eap | RHSA-2023:1513 |
Frequently Asked Questions
Is CVE-2022-41854 in your dependencies?
Find it across Maven, including transitive dependencies.