Skip to content
Heist/ feed
Back to feed
High

llama.cpp — security advisory

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

llama.cpp builds b1283 through b9058 contain an integer overflow vulnerability in the llama_batch_init() function where unchecked multiplications in malloc() calls can wrap past INT32_MAX when computing allocation sizes. Attackers can pass specially crafted parameters to trigger integer overflow, causing heap corruption and potentially achieving arbitrary code execution through subsequent batch operations that write past allocated buffer boundaries.

Products
llama.cpp
Affected versions
10438+dfsg-1, 10438+dfsg-1ubuntu1, 5882+dfsg-2, 8064+dfsg-1ubuntu1, 8681+dfsg-1, 9721+dfsg-1ubuntu1
Fixed versions
Not specified
CVEs
CVE-2026-43627
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 02:44 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-43627

core-osv · Original source

Published 6 Aug 2026, 22:17 UTC

llama.cpp builds b1283 through b9058 contain an integer overflow vulnerability in the llama_batch_init() function where unchecked multiplications in malloc() calls can wrap past INT32_MAX when computing allocation sizes. Attackers can pass specially crafted parameters to trigger integer overflow, causing heap corruption and potentially achieving arbitrary code execution through subsequent batch operations that write past allocated buffer boundaries.

osv:UBUNTU-CVE-2026-43627

llama.cpp

Fixed versions: Not specified

llama.cpp

Fixed versions: Not specified

Complete source record
{
  "id": "0f4e5fee0ed5c07588328946a656aa90ea7df9fa951631ff4b868825987d048b",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-43627",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-43627",
    "summary": "llama.cpp builds b1283 through b9058 contain an integer overflow vulnerability in the llama_batch_init() function where unchecked multiplications in malloc() calls can wrap past INT32_MAX when computing allocation sizes. Attackers can pass specially crafted parameters to trigger integer overflow, causing heap corruption and potentially achieving arbitrary code execution through subsequent batch operations that write past allocated buffer boundaries.",
    "evidence": "osv:UBUNTU-CVE-2026-43627",
    "products": [
      {
        "name": {
          "value": "llama.cpp",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "8681+dfsg-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "9721+dfsg-1ubuntu1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "10438+dfsg-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "10438+dfsg-1ubuntu1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "llama.cpp",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5882+dfsg-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "8064+dfsg-1ubuntu1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "8681+dfsg-1",
            "evidence": "/affected/1/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2026-43627",
      "aliases": [
        "UBUNTU-CVE-2026-43627"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
        },
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "llama.cpp",
            "purl": "pkg:deb/ubuntu/llama.cpp?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "8681+dfsg-1",
            "9721+dfsg-1ubuntu1",
            "10438+dfsg-1",
            "10438+dfsg-1ubuntu1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-43627.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libllama0",
                "binary_version": "10438+dfsg-1ubuntu1"
              },
              {
                "binary_name": "llama.cpp",
                "binary_version": "10438+dfsg-1ubuntu1"
              },
              {
                "binary_name": "llama.cpp-examples",
                "binary_version": "10438+dfsg-1ubuntu1"
              },
              {
                "binary_name": "llama.cpp-services",
                "binary_version": "10438+dfsg-1ubuntu1"
              },
              {
                "binary_name": "llama.cpp-tests",
                "binary_version": "10438+dfsg-1ubuntu1"
              },
              {
                "binary_name": "llama.cpp-tools",
                "binary_version": "10438+dfsg-1ubuntu1"
              },
              {
                "binary_name": "llama.cpp-tools-extra",
                "binary_version": "10438+dfsg-1ubuntu1"
              },
              {
                "binary_name": "python3-gguf",
                "binary_version": "10438+dfsg-1ubuntu1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "llama.cpp",
            "purl": "pkg:deb/ubuntu/llama.cpp?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "5882+dfsg-2",
            "8064+dfsg-1ubuntu1",
            "8681+dfsg-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-43627.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "libllama0",
                "binary_version": "8681+dfsg-1"
              },
              {
                "binary_name": "llama.cpp",
                "binary_version": "8681+dfsg-1"
              },
              {
                "binary_name": "llama.cpp-examples",
                "binary_version": "8681+dfsg-1"
              },
              {
                "binary_name": "llama.cpp-tests",
                "binary_version": "8681+dfsg-1"
              },
              {
                "binary_name": "llama.cpp-tools",
                "binary_version": "8681+dfsg-1"
              },
              {
                "binary_name": "llama.cpp-tools-extra",
                "binary_version": "8681+dfsg-1"
              },
              {
                "binary_name": "python3-gguf",
                "binary_version": "8681+dfsg-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:58:55.601285010Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-43627"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-43627",
        "https://www.cve.org/CVERecord?id=CVE-2026-43627",
        "https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-43627",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 359178,
  "published_at": "2026-08-06T22:17:00+00:00"
}