Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

Skip to content
Check your stack
CVE-2026-115922medium6.2

ONNX: Denial of service via unchecked expansion of packed sub-byte tensors in ONNX Python APIs

Impact

ONNX's Python tensor-materialization helpers could allocate memory according to attacker-controlled tensor dimensions without verifying that a packed sub-byte payload contained the declared number of elements.

Source excerpt · OSV

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

onnx PyPI
Affected range Recorded fix
Earlier releases before 1.22.0Ecosystem versions1.22.0

Version evidence: OSV · GHSA-q69g-f4f5-v8m7

View original version evidence (50 explicit versions)

Affected products

Vendor version evidence. Product records are separate from automatic dependency matching.

onnx · GitHub_M

onnx

1 range

Compare with this publisher’s ranges. This does not inspect your installation.

affected

< 1.22.0

unaffected

unknown

Other versions: unknown

Original source description

Summary

ONNX's Python tensor-materialization helpers could allocate memory according to attacker-controlled tensor dimensions without verifying that a packed sub-byte payload contained the declared number of elements.

A very small model could therefore cause a disproportionately large allocation when an application called onnx.numpy_helper.to_array() or constructed onnx.reference.ReferenceEvaluator with the model. The issue affected UINT2, INT2, UINT4, INT4, and FLOAT4E2M1 tensors stored in either raw_data or packed int32_data.

Technical details

The vulnerable _unpack_2bit() and _unpack_4bit() paths first allocated a small array based on the available packed bytes, then resized it to the shape declared in TensorProto.dims. They did not first confirm that the payload encoded enough logical elements for that shape.

For example, the reporter demonstrated a 66-byte model containing one packed byte and a declared dimension of 700,000,000. The model passed onnx.checker.check_model() and allocated approximately 700 MB while materializing the initializer, followed by another large allocation when executing the reference evaluator.

Loading, checking, or running shape inference on the serialized model alone did not trigger the allocation. The vulnerable tensor had to be materialized.

Impact

An application that materializes packed tensors from an untrusted model can exhaust available memory, causing denial of service. Memory corruption and code execution were not demonstrated.

Affected versions

  • Affected: ONNX through 1.21.0
  • Patched: ONNX 1.22.0

Remediation

Upgrade to ONNX 1.22.0 or later.

The primary fix validates the logical element count before resizing the unpacked NumPy array. A complementary checker change rejects an undersized packed payload before materialization.

The five affected tensor types and both storage formats were re-tested against the published ONNX 1.23.2 wheel and are rejected before the oversized allocation.

To verify the behavior using a released vulnerable package in an isolated environment, install onnx==1.21.0 with python -m pip install "onnx==1.21.0". Run memory-exhaustion demonstrations only with an appropriate process memory limit.

Severity

The vulnerable ONNX component processes the malicious model through a local library API or file boundary and is not itself bound to a network stack. Applications that expose ONNX model processing over a network should calculate an Environmental score with Modified Attack Vector set to Network.

Inside the record

Evidence available

Package identity
Version evidence
Remediation guidance · not supplied
Weakness classification
Additional publishers

Describes the evidence in this view, not whether the product is safe.

Original records

CVE-2026-115922

View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.

cve.new JSON →

Underlying weaknesses

The source’s classification of what caused the vulnerability.

CWE-789 ↗

CWE-789: Memory Allocation with Excessive Size Value

GitHub_M

Related →
Contributing organizations · 2
GitHub_M

Assigning organization

2026-10-26
CISA-ADP

Additional data publisher

2026-10-30

What changed

Follow changes
  1. CVE · CVE-2026-115922

    Observed 2026-10-30T18:28:15.297Z · upstream updated 2026-10-30T17:40:32.752Z

    Prioritization updated

    before

    []

    after

    [
      {
        "source": "CISA-ADP",
        "type": "SSVC",
        "role": "CISA Coordinator",
        "timestamp": "2026-10-30T17:40:12.778537Z",
        "decisions": [
          {
            "name": "Exploitation",
            "value": "none"
          },
          {
            "name": "Automatable",
            "value": "no"
          },
          {
            "name": "Technical Impact",
            "value": "partial"
          }
        ]
      }
    ]

Large field values are marked as truncated previews. Original source snapshots remain retained.

Showing up to 50 most recent observed changes.

References

10 sources