Upgrading onnxruntime 0.5 to 1
Breaking0.5.0 → 1.31.1Breaking21Security94Platform7Deprecated7New373Changed221Fixed218Other146
Fetching 57 releases from GitHub…29 / 57
SecurityLimits sparse-initializer dense allocations, checks sparse value cardinality, validates inline raw and ORT-format string initializer sizes, and includes string payloads in size limits.#32684 ↗
BreakingUpgrade verdict
21 breaking changes and 7 platform requirement changes and 94 security fixes.
In plain terms
- Models that relied on the TensorRT fused causal attention kernels in the CUDA execution provider will no longer use them.
- The old way of generating WGSL shaders through duktape or Node is gone; the Python wgsl-gen tool is used instead.
- The old unfused multi-head attention path is gone, so models relying on it will use the new dispatch path instead.
- If you use the CUDA 12 build of onnxruntime, it will stop being published in the next release.
Must act Top 5 of 129 that need code or config changes
Requires Python >=3.11 from 1.24.4 (none stated before).
Adds flatbuffers, numpy >=1.21.6, packaging, protobuf >=4.25.8.
Installs 4 packages in all (was 0).
What you must change
Breaking21
Removes the TensorRT fused causal attention kernels from the CUDA EP.
Removes the dynamic WGSL generator (duktape/Node) path in favor of the Python wgsl-gen implementation.
wgsl-genImproves the ONNX Attention dispatch path and removes the legacy unfused MHA path.
AttentionMHASupport for CUDA 12 will be removed in 1.27.0.
Renames WebNN pool2d property roundingType to outputShapeRounding.
pool2droundingTypeoutputShapeRoundingVitisAI EP: Removed s_kernel_registry_vitisaiep.reset() in deinitialize_vitisai_ep().
s_kernel_registry_vitisaiep.reset()deinitialize_vitisai_ep()Effective immediately, the Arm NN EP is deprecated and will no longer be maintained.
All build options, documentation, and examples referencing ArmNN will be removed once the upstream change merges; the removal will appear in the first ONNX Runtime release that includes that change.
OnnxRuntime GPU packages require CUDA 12.x, packages built for CUDA 11.x are no longer published.
Deleted the constant SKIP_CUDA_TEST_WITH_DML - @CodingSeaotter.
OpenCV dependency removed from C API build.
Removed Xamarin support.
Removes Windows ARM32 binaries from official packages; users who still need them can build from source.
GatherBlockQuantized now produces zero output slices for out-of-range indices across CPU, CUDA and WebGPU, differing from ONNX Gather error semantics.
GatherBlockQuantizedModel-package consumers must use OrtApi::GetModelPackageApi and the stable OrtModelPackageApi table; experimental lookup entries were removed.
OrtApi::GetModelPackageApiOrtModelPackageApiRemoves the unused internal onnxruntime/python/tools/tensorrt dashboard tooling; TensorRT EP APIs are unaffected.
onnxruntime/python/tools/tensorrtNegative CPU Split axes now produce an error instead of being accepted.
SplitUpgrades to ONNX 1.22.0 and protobuf 6.33.5, with graph optimizer opset version checks updated accordingly.
ORT_API_VERSION updated to 25.
ORT_API_VERSION updated to 24.
Splits the ONNX Runtime GPU Nuget package into two packages.
Security94
Limits sparse-initializer dense allocations, checks sparse value cardinality, validates inline raw and ORT-format string initializer sizes, and includes string payloads in size limits.
Rejects duplicate model-local functions, recursive function graph attributes, non-control-flow nodes with subgraphs, inputs to zero-input schemas, and bounds AOT function expansion.
Validates optional graph inputs, Constant nodes, ORT-format input argument counts, and contrib-op shape inference; fixes out-of-bounds reads in Loop/Scan initializers and shape-inference input data.
ConstantLoopScanBounds external-data validation to opened files and rejects model-package-controlled output-file options, including optimized-model output paths.
Strengthens optimizer validation for initializer types, shape propagation, QDQ weight shapes and axes, and LabelEncoder fusion attributes.
LabelEncoderLimits nested model-graph depth and canonicalizes external-data locations to harden model loading.
Adds checked rounding for BFC arena allocations and fixes prepacked-weight reference lifetimes.
Strengthens shape, rank, and parameter validation for Split, Scan, GatherND, ScatterND, SpaceToDepth/DepthToSpace, Crop, Conv, Normalizer, and pooling.
SplitScanGatherNDScatterNDSpaceToDepthDepthToSpaceCropConvHardens generation and attention input handling, including attention-attribute narrowing, BifurcationDetector inputs, generation subgraph shapes, and QEmbed segment inputs.
BifurcationDetectorBeamSearchQEmbedValidates TreeEnsemble node references, bounds subtree comparison, rejects non-finite CPU RoiAlign coordinates, and requires ImageScaler bias to match channel count.
TreeEnsembleRoiAlignImageScalerAdds an allowlist of safe LoRA adapter parameter data types, validates MatMulFpQ4 shape inputs, and checks MLAS blockwise quantization index ranges.
MatMulFpQ4Hardens CUDA indexing and buffer-size arithmetic in MatMulNBits, RemovePadding, RotaryEmbedding, SparseAttention, Whisper beam search, NMS, QDQ, and GatherElements.
MatMulNBitsRemovePaddingRotaryEmbeddingSparseAttentionGatherElementsHardens graph optimizers against model-supplied indices and invalid fusion inputs, including MatMulNBits dequantization block sizes, GQA projection shapes, and Slice starts rank.
MatMulNBitsSliceFixes a path traversal vulnerability in TensorRT and NvTensorRTRTX engine refitting by making external-data path validation unconditional.
TensorRTNvTensorRTRTXValidates the CPU MoE k attribute against the number of experts and fixes a CPU TensorScatter security issue.
MoETensorScatterAdds missing rank, shape, and parameter validation for pooling, LSTM, DynamicQuantizeLSTM, Sampling, FeatureVectorizer, SkipLayerNorm, QLinearConv, Whisper decoding, RNN activations, GridSample…
LSTMDynamicQuantizeLSTMSamplingFeatureVectorizerSkipLayerNormQLinearConvGridSampleCropAndResizeHardens CUDA indexing and buffer handling in GridSample, transpose, GatherBlockQuantized, InstanceNormalization, LayerNorm/RMSNorm, BeamSearch, DeformConv, AveragePool, and MaxPool.
GridSampleGatherBlockQuantizedInstanceNormalizationLayerNormRMSNormBeamSearchDeformConvAveragePoolFixes packed sub-byte tensor over-copying in OrtApi::GetValue and validates DML constant tensor byte sizes.
OrtApi::GetValueUpdates npm lockfiles, refreshes the Next.js end-to-end fixture lockfile for security advisories, and upgrades adm-zip for onnxruntime-node.
adm-ziponnxruntime-nodeHardens the ORT FlatBuffer model loader against malformed buffers and removes now-redundant table offset validation.
Fixes type confusion in raw-pointer bind_input that caused an out-of-bounds write.
bind_inputFixes an out-of-bounds pointer in TensorAt for sub-byte packed types.
TensorAtFixes arbitrary memory read, out-of-bounds dereference and other OOB accesses in kernels.
Validates Col2Im inputs to prevent heap over-read.
Col2ImHardens CropAndResize against malformed crop_size tensors.
CropAndResizecrop_sizeValidates BeamSearch vocab_size against logits width.
BeamSearchvocab_sizeFixes bounds in WhisperDecoderSubgraph::CreateInitialFeeds.
WhisperDecoderSubgraph::CreateInitialFeedsValidates SparseAttention CSR indices and key lengths and rejects zero-dimension block_row_indices.
SparseAttentionblock_row_indicesClamps derived sequence lengths and KV-cache index in CUDA GroupQueryAttention and fixes a CPU GQA out-of-bounds read in the past-KV buffer.
GroupQueryAttentionClamps 1D attention mask_index to valid bounds.
mask_indexValidates MaxpoolWithMask kernel rank against input spatial rank.
MaxpoolWithMaskRejects CUDA BERT EmbedLayerNorm and SkipLayerNorm shapes exceeding 32-bit output indexing.
EmbedLayerNormSkipLayerNormFixes the optional-output guard in DecoderAttention and MultiHeadAttention shape inference and negative-axis handling in ExpandDims shape inference.
DecoderAttentionMultiHeadAttentionExpandDimsFixes TreeEnsemble target id validation and adds input validation to LinearClassifier.
TreeEnsembleLinearClassifierFixes zero-point and scale validation typos in DynamicQuantizeLSTM.
DynamicQuantizeLSTMHandles non-trivially-copyable types in Loop and Scan output concatenation.
LoopScanNormalizes bool tensor raw_data to {0, 1} when unpacking.
raw_dataAddresses hardening gaps in Resize, PadFusion, and LoRA handling.
ResizePadFusionLoRAFixes unbounded lifetime on WithOutputTensor in the Rust bindings.
WithOutputTensorGuards MlasConvPrepare working-buffer products and ConvTranspose pad computation with SafeInt.
MlasConvPrepareConvTransposeSafeIntFixes signed-int overflow in SamplingState::Init that could cause a heap buffer overflow.
SamplingState::InitHardens QMoE against integer overflow and partial K tiles.
QMoEValidates B, scales, and zero-points shapes in MatMulNBits::PrePack.
MatMulNBits::PrePackPre-checks ConstantOfShape output size against the input initializer before constant folding.
ConstantOfShapeFixes integer overflow in RKNPU implicit bias allocation.
RKNPUFixes WebGPU out-of-bounds reads in Pad, Slice, and GatherBlockQuantized.
PadSliceGatherBlockQuantizedUpdates protobuf to mitigate CVE-2026-0994 and bumps ONNX/protobuf to fix additional CVEs.
protobufONNXAvoids shell injection in the training helper and switches Triton compile helpers to subprocess.
subprocessValidates archive extraction paths in the transformers tooling.
Validates and inlines external data in node tensor attributes during session initialization.
Enables Spectre-mitigated MSVC libraries for BinSkim builds.
BinSkimBumps npm dependencies shell-quote, esbuild, tmp, ws, protobufjs, js-yaml, tar, markdown-it, and @babel/core.
shell-quoteesbuildtmpwsprotobufjsjs-yamltarmarkdown-itFixes out-of-bounds read in SoftmaxCrossEntropyLoss via label bounds validation.
SoftmaxCrossEntropyLossHardens OneHot input validation and output-size computation.
OneHotAdds SafeInt overflow protection in Expand and caps constant-folding output sizes.
ExpandSafeIntBounds total output allocation size in the Tile kernel.
TileAdds mask/input shape consistency checks in MaxpoolWithMask::Compute.
MaxpoolWithMask::ComputeFixes BitShift undefined behavior for shift amounts greater than or equal to bit width.
BitShiftValidates sequence bounds in GQA (seqlens_k vs cos_cache).
GQAseqlens_kcos_cacheValidates conv bias shape in WordConvEmbedding to prevent out-of-bounds reads.
WordConvEmbeddingFixes int32 overflow in CUDA Cast and UnaryElementWise kernels for very large tensors.
CastUnaryElementWiseFixes out-of-bounds read in CropBase scale handling.
CropBaseFixes rank-underflow bug in Inverse kernel trailing-dimension indexing.
InverseAdds sparse tensor external file path validation and additional external-path hardening.
Switches remaining torch.load() calls to weights_only=True.
torch.load()weights_onlyAdds CPU cache-indirection beam-index validation.
Adds additional overflow and bounds checks with test coverage in runtime buffers.
Replaces unrestricted Python setattr configuration with an allowlist.
setattrHardens multiple OOB and overflow scenarios across ML and core ops.
Fixes Attention mask index OOB write.
AttentionAdds MaxPoolGrad indices bounds validation.
MaxPoolGradApplies SVM and TreeEnsemble bounds and security fixes.
SVMTreeEnsembleFixes RNN sequence_lens OOB read and integer overflow handling.
RNNsequence_lensAdds GroupQueryAttention seqlens_k bounds validation and a compatibility follow-up.
GroupQueryAttentionseqlens_kAdds MatMulBnb4 and ML coefficient SafeInt checks.
MatMulBnb4SafeIntFixes CUDA Gather int32 overflow.
GatherHardens GridSample float to int64 cast for NaN, Inf and out-of-range coordinates.
GridSampleAdds position ID bounds validation in WebGPU/JS RotaryEmbedding.
RotaryEmbeddingFixed potential integer truncation leading to heap out-of-bounds read/write.
Addressed Pad Reflect vulnerability.
Security fix for transpose optimizer.
Upgraded minimatch 3.1.2 → 3.1.4 for CVE-2026-27904.
Hardened shell command handling for constant strings.
Added validation of onnx::TensorProto data size before allocation.
onnx::TensorProtoCleaned up external data path validation.
Fixed misaligned address reads for tensor attributes from raw data buffers.
Fixed CPU Attention overflow issue.
Fixed CPU LRN integer overflow issues.
Additional input validation hardening.
Core: Fixed GatherCopyData integer truncation leading to heap out-of-bounds read/write.
Core: Fixed RoiAlign heap out-of-bounds read via unchecked batch_indices.
Core: Prevent heap OOB from maliciously crafted Lora Adapters.
Core: Fixed out-of-bounds access for Resize operation.
Builds Linux binaries (except AMD GPU packages) in a more secure way compliant with BinSkim's default policy, e.g. no executable stack.
Platform7
Python: Updated python_requires from >=3.10 to >=3.11 to reflect dropped Python 3.10 support.
python_requiresPython 3.14 support added.
Free-threaded Python (PEP 703) — Added support for Python 3.13t and 3.14t in Linux.
x86_64 binaries for macOS/iOS are no longer provided and minimum macOS is raised to 14.0.
iOS >= 15.1.
Discontinued support for iOS 12 and increasing the minimum supported iOS version to 13.
Building for Linux ARM64 or Android requires a C/C++ compiler with BFloat16 support; Android NDK 24.x support is removed, use NDK 25.x or 26.x.
Deprecations to plan for
Deprecated7
Deprecates the ACL EP, which will be removed in a future release; source builds using --use_acl now receive a deprecation warning.
--use_aclonnxruntime-web deprecates WebGL and JSEP; the native WebGPU EP is the recommended path going forward.
WebGLJSEPWebGPU EPDeprecates SkipLayerNorm strict mode.
SkipLayerNormCUDA 12 packages are deprecated; users should move to CUDA 13.
All ONNX Runtime Training packages have been deprecated.
The onnxruntime-mobile Android package and onnxruntime-mobile-c/onnxruntime-mobile-objc iOS cocoapods are being deprecated.
Announces that support for Windows ARM32 will be totally dropped in the next release.