Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2016-2338

An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer "head" allocation is made based on tags array length. Specially constructed object passed as element of tags array can increase this array size after mentioned allocation and cause heap overflow.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2016-2338
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 06:18 UTC · Revision 1

Source evidence

CVE-2016-2338

core-osv · Original source

Published 29 Sept 2022, 03:15 UTC

An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer "head" allocation is made based on tags array length. Specially constructed object passed as element of tags array can increase this array size after mentioned allocation and cause heap overflow.

osv:CVE-2016-2338
Complete source record
{
  "id": "14756de420df40fd247defa57797e84c4e26b50fb615f47483080237c4dd4934",
  "url": "https://osv.dev/vulnerability/CVE-2016-2338",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2016-2338",
    "summary": "An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer \"head\" allocation is made based on tags array length. Specially constructed object passed as element of tags array can increase this array size after mentioned allocation and cause heap overflow.",
    "evidence": "osv:CVE-2016-2338",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2016-2338",
      "aliases": [
        "CVE-2016-2338"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ruby/ruby",
              "type": "GIT",
              "events": [
                {
                  "introduced": "a9721a259665149b1b9ff0beabcf5f8dc0136120"
                },
                {
                  "last_affected": "d40ea2afa6ff5a6e5befcf342fb7b6dc58796b20"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:ruby-lang:ruby:2.2.2:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.2.2"
                      },
                      {
                        "last_affected": "2.2.2"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:ruby-lang:ruby:2.3.0:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.3.0"
                      },
                      {
                        "last_affected": "2.3.0"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.2.2",
            "2.3.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2016-2338.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:37.645383969Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2020/03/msg00032.html",
        "https://security.netapp.com/advisory/ntap-20221228-0005/"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "debian:debian_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "8.0"
                  },
                  {
                    "last_affected": "8.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2016-2338",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 434273,
  "published_at": "2022-09-29T03:15:11.47+00:00"
}