Skip to content
Heist/ feed
Back to feed
High

Remote Code execution in SnakeYAML

Type: advisorySources: OSV

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 upgrading to version 2.0 and beyond.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-1471
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 02:34 UTC · Revision 1

Source evidence

Remote Code execution in SnakeYAML

core-osv · Original source

Published 1 Dec 2022, 10:47 UTC

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 upgrading to version 2.0 and beyond.

osv:CVE-2022-1471
Complete source record
{
  "id": "c901325352deef4b92cc24ddee188a54a802b125b8673a89c6c2ac5590fcfd2f",
  "url": "https://osv.dev/vulnerability/CVE-2022-1471",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Remote Code execution in SnakeYAML",
    "summary": "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 upgrading to version 2.0 and beyond.",
    "evidence": "osv:CVE-2022-1471",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2022-1471",
      "aliases": [
        "CVE-2022-1471",
        "GHSA-mjmj-j48q-9wg2"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://bitbucket.org/snakeyaml/snakeyaml",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "59ddbb3304bb8e22e2004d74cddaf9ed4086632e"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:snakeyaml_project:snakeyaml:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "snakeyaml-1.33",
            "snakeyaml-1.32",
            "snakeyaml-1.30",
            "snakeyaml-1.27",
            "snakeyaml-1.26",
            "snakeyaml-1.25",
            "snakeyaml-1.24",
            "snakeyaml-1.23",
            "snakeyaml-1.22",
            "snakeyaml-1.21",
            "snakeyaml-1.20",
            "snakeyaml-1.19",
            "v1.18",
            "v1.17",
            "v1.16",
            "v1.15",
            "v1.13",
            "v1.12",
            "v1.11",
            "v1.10",
            "v1.9",
            "v1.8",
            "v1.7",
            "v1.7rc1",
            "v1.6",
            "1.6rc2",
            "v1.6rc1",
            "v1.5",
            "v1.5rc1",
            "v1.4rc1",
            "v1.3",
            "v1.2",
            "v1.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-1471.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:46.039435535Z",
      "provider": "osv",
      "references": [
        "https://bitbucket.org/snakeyaml/snakeyaml/issues/561/cve-2022-1471-vulnerability-in#comment-64581479",
        "https://confluence.atlassian.com/security/cve-2022-1471-snakeyaml-library-rce-vulnerability-in-multiple-products-1296171009.html",
        "https://groups.google.com/g/kubernetes-security-announce/c/mwrakFaEdnc",
        "https://infosecwriteups.com/%EF%B8%8F-inside-the-160-comment-fight-to-fix-snakeyamls-rce-default-1a20c5ca4d4c",
        "https://www.github.com/mbechler/marshalsec/blob/master/marshalsec.pdf?raw=true",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1471.json",
        "https://github.com/google/security-research/security/advisories/GHSA-mjmj-j48q-9wg2",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-1471",
        "https://security.netapp.com/advisory/ntap-20230818-0015/",
        "https://security.netapp.com/advisory/ntap-20240621-0006/",
        "https://github.com/mbechler/marshalsec"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-20"
        ],
        "cna_assigner": "Google",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "last_affected": "2.0"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1471.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-1471",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 514321,
  "published_at": "2022-12-01T10:47:07.203+00:00"
}