Skip to content
Heist/ feed
Back to feed
High

libcrypt-sysrandom-xs-perl — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-2597

Crypt::SysRandom::XS versions before 0.010 for Perl is vulnerable to a heap buffer overflow in the XS function random_bytes(). The function does not validate that the length parameter is non-negative. If a negative value (e.g. -1) is supplied, the expression length + 1u causes an integer wraparound, resulting in a zero-byte allocation. The subsequent call to chosen random function (e.g. getrandom) passes the original negative value, which is implicitly converted to a large unsigned value (typically SIZE_MAX). This can result in writes beyond the allocated buffer, leading to heap memory corruption and application crash (denial of service). In common usage, the length argument is typically hardcoded by the caller, which reduces the likelihood of attacker-controlled exploitation. Applications that pass untrusted input to this parameter may be affected.

Products
libcrypt-sysrandom-xs-perl
Affected versions
0.009-2, 0.011-1, 0.011-1build1
Fixed versions
Not specified
CVEs
CVE-2026-2597
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 00:51 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-2597

core-osv · Original source

Published 27 Feb 2026, 00:16 UTC

Crypt::SysRandom::XS versions before 0.010 for Perl is vulnerable to a heap buffer overflow in the XS function random_bytes(). The function does not validate that the length parameter is non-negative. If a negative value (e.g. -1) is supplied, the expression length + 1u causes an integer wraparound, resulting in a zero-byte allocation. The subsequent call to chosen random function (e.g. getrandom) passes the original negative value, which is implicitly converted to a large unsigned value (typically SIZE_MAX). This can result in writes beyond the allocated buffer, leading to heap memory corruption and application crash (denial of service). In common usage, the length argument is typically hardcoded by the caller, which reduces the likelihood of attacker-controlled exploitation. Applications that pass untrusted input to this parameter may be affected.

osv:UBUNTU-CVE-2026-2597

libcrypt-sysrandom-xs-perl

Fixed versions: Not specified

libcrypt-sysrandom-xs-perl

Fixed versions: Not specified

libcrypt-sysrandom-xs-perl

Fixed versions: Not specified

Complete source record
{
  "id": "37d4009ff9dbaa3a93bf9efec57fda7840c97d96599f62815370b02a29ff8b74",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-2597",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-2597",
    "summary": "Crypt::SysRandom::XS versions before 0.010 for Perl is vulnerable to a heap buffer overflow in the XS function random_bytes(). The function does not validate that the length parameter is non-negative. If a negative value (e.g. -1) is supplied, the expression length + 1u causes an integer wraparound, resulting in a zero-byte allocation. The subsequent call to chosen random function (e.g. getrandom) passes the original negative value, which is implicitly converted to a large unsigned value (typically SIZE_MAX). This can result in writes beyond the allocated buffer, leading to heap memory corruption and application crash (denial of service). In common usage, the length argument is typically hardcoded by the caller, which reduces the likelihood of attacker-controlled exploitation. Applications that pass untrusted input to this parameter may be affected.",
    "evidence": "osv:UBUNTU-CVE-2026-2597",
    "products": [
      {
        "name": {
          "value": "libcrypt-sysrandom-xs-perl",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.009-2",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libcrypt-sysrandom-xs-perl",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.009-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.011-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.011-1build1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libcrypt-sysrandom-xs-perl",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.009-2",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2026-2597",
      "aliases": [
        "UBUNTU-CVE-2026-2597"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "libcrypt-sysrandom-xs-perl",
            "purl": "pkg:deb/ubuntu/libcrypt-sysrandom-xs-perl?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "0.009-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-2597.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libcrypt-sysrandom-xs-perl",
                "binary_version": "0.009-2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "libcrypt-sysrandom-xs-perl",
            "purl": "pkg:deb/ubuntu/libcrypt-sysrandom-xs-perl?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "0.009-2",
            "0.011-1",
            "0.011-1build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-2597.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libcrypt-sysrandom-xs-perl",
                "binary_version": "0.011-1build1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "libcrypt-sysrandom-xs-perl",
            "purl": "pkg:deb/ubuntu/libcrypt-sysrandom-xs-perl?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "0.009-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-2597.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libcrypt-sysrandom-xs-perl",
                "binary_version": "0.009-2"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:56:12.697471190Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-2597"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-2597",
        "https://www.cve.org/CVERecord?id=CVE-2026-2597"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-2597",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 354955,
  "published_at": "2026-02-27T00:16:00+00:00"
}