{"id":"CVE-2026-44512","aliases":["CVE-2026-44512","GHSA-hwpq-hmq9-wj77","PYSEC-2026-2689"],"related":[],"kind":"vulnerability","state":"published","title":"ONNX: Null Pointer Dereference in Upsample Version Converter Adapter (Zero Inputs)","summary":"Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.9.0 before 1.22.0, onnx.version_converter.convert_version() can dereference a null pointer in Upsample_6_7::adapt_upsample_6_7() in onnx/version_converter/adapters/upsample_6_7.h when processing an untrusted model with an Upsample node that has zero inputs, causing an unrecoverable denial of service. This issue is fixed in version 1.22.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.9.0 before 1.22.0, onnx.version_converter.convert_version() can dereference a null pointer in Upsample_6_7::adapt_upsample_6_7() in onnx/version_converter/adapters/upsample_6_7.h when processing an untrusted model with an Upsample node that has zero inputs, causing an unrecoverable denial of service. This issue is fixed in version 1.22.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nNull pointer dereference (SIGSEGV) in `Upsample_6_7::adapt_upsample_6_7()` (`onnx/version_converter/adapters/upsample_6_7.h:31`) when `convert_version()` processes a model with an Upsample node that has zero inputs. The adapter accesses `node->inputs()[0]->sizes()` without checking input count. 107-byte PoC crashes on Release build.\n\nThis is the same class of bug as the Cast adapter advisory (separate report) but in a different adapter, different file, and different operator.\n\n### Details\n\nThe Upsample 6→7 adapter validates attributes but not inputs:\n```cpp\n// upsample_6_7.h:20-33\nvoid adapt_upsample_6_7(..., Node* node) const {\n    ONNX_ASSERTM(\n        node->hasAttribute(width_scale_symbol) && node->hasAttribute(height_scale_symbol),\n        \"...\")  // Attribute check PASSES\n\n    auto width_scale = node->f(width_scale_symbol);\n    auto height_scale = node->f(height_scale_symbol);\n\n    auto input_shape = node->inputs()[0]->sizes();\n    //                 ^^^^^^^^^^^^^^^^^^^^\n    //                 OOB when inputs().size() == 0 → SIGSEGV\n}\n```\n\nThe PoC has an Upsample node at opset 6 with the required `width_scale` and `height_scale` attributes but zero inputs. The attribute assertions pass, then `node->inputs()[0]` on an empty `ArrayRef`:\n- Release builds (`NDEBUG`): bounds-check assertion compiled out → reads garbage pointer → SIGSEGV\n- Debug builds: `assert(Index < Length)` at `array_ref.h:159` → SIGABRT\n\nAn Upsample node with zero inputs passes `graphProtoToGraph()` because the import code only resolves input names present in the protobuf.\n\n### PoC\n```python\nimport base64\nimport onnx\nfrom onnx import version_converter\n\npoc_b64 = \"CAI6YQo8EgFZIghVcHNhbXBsZSoVCgt3aWR0aF9zY2FsZRUAAABAoAEBKhYKDGhlaWdodF9zY2FsZRUAAABAoAEBEgR0ZXN0YhsKAVkSFgoUCAESEAoCCAEKAggBCgIIBAoCCARCBAoAEAY=\"\n\nmodel = onnx.load_from_string(base64.b64decode(poc_b64))\n\n# CRASHES — Upsample_6_7 adapter dereferences empty inputs array\nversion_converter.convert_version(model, 7)  # SIGSEGV\n```\n\n107-byte PoC. Confirmed SIGSEGV on both onnx 1.21.0 (pip) and 1.22.0 (source build).\n\n### Impact\n\nAny application that uses `onnx.version_converter.convert_version()` on untrusted models is vulnerable. This includes model conversion pipelines and tools that auto-upgrade opset versions for compatibility. The crash is unrecoverable (SIGSEGV). \n\nThis vulnerability is part of a systemic pattern across multiple version converter adapters. A full audit of all ~45 adapters was performed as part of the fix; eight adapters were found with the same class of unguarded indexed access (cast_9_8, softmax_12_13, softmax_13_12, upsample_6_7, upsample_9_10, group_normalization_20_21, broadcast_forward_compatibility, upsample_9_8) and all have been fixed in PR #7813.","format":"markdown","source":"ghsa"}],"published":"2026-07-07T13:02:10.000Z","modified":"2026-09-10T03:50:12.336Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"version":">= 1.9.0, < 1.22.0","status":"affected"}],"vendor":"onnx","product":"onnx","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.9.0","status":"affected","fixed":"1.22.0"}],"ecosystem":"PyPI","package":"onnx","purl":"pkg:pypi/onnx","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.9.0","fixed":"1.22.0"}],"vendor":"linuxfoundation","product":"onnx","cpe":"cpe:2.3:a:linuxfoundation:onnx:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"1.9.0","status":"affected","fixed":"1.22.0"}],"ecosystem":"PyPI","package":"onnx","purl":"pkg:pypi/onnx","source":"pysec"}],"references":[{"url":"https://github.com/onnx/onnx/security/advisories/GHSA-hwpq-hmq9-wj77","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/onnx/onnx/pull/7813","tags":["issue-tracking","patch","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/onnx/onnx/commit/cd310408165ad47c3cd7eb2b86cb5b80aa2e4fdf","tags":["patch","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/onnx/onnx/releases/tag/v1.22.0","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/onnx/onnx/pull/7916","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/onnx/onnx","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/onnx","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-hwpq-hmq9-wj77","tags":["advisory"],"sources":["pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44512","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-07-09T13:36:51.723Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44512","url":"https://www.cve.org/CVERecord?id=CVE-2026-44512","licence":"CVE Terms of Use","modified":"2026-07-09T13:36:58.289Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hwpq-hmq9-wj77","url":"https://github.com/advisories/GHSA-hwpq-hmq9-wj77","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:12.336Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44512","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44512","licence":"Public domain","modified":"2026-07-13T17:02:01.533Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2689","url":"https://osv.dev/vulnerability/PYSEC-2026-2689","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:54.590Z"}],"updatedAt":"2026-11-25T22:59:27.412Z","epss":{"score":0.00201,"percentile":0.10529,"date":"2026-12-01T12:00:22.000Z"}}