Skip to content

Upgrading onnxruntime 0.5 to 1

Breaking0.5.0 → 1.31.1Breaking21Security94Platform7Deprecated7New373Changed221Fixed218Other146

Fetching 57 releases from GitHub…29 / 57
BreakingUpgrade verdict

21 breaking changes and 7 platform requirement changes and 94 security fixes.

  • 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.
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).

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-gen
Improves the ONNX Attention dispatch path and removes the legacy unfused MHA path.
AttentionMHA
Support for CUDA 12 will be removed in 1.27.0.
Renames WebNN pool2d property roundingType to outputShapeRounding.
pool2droundingTypeoutputShapeRounding
VitisAI 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.
GatherBlockQuantized
Model-package consumers must use OrtApi::GetModelPackageApi and the stable OrtModelPackageApi table; experimental lookup entries were removed.
OrtApi::GetModelPackageApiOrtModelPackageApi
Removes the unused internal onnxruntime/python/tools/tensorrt dashboard tooling; TensorRT EP APIs are unaffected.
onnxruntime/python/tools/tensorrt
Negative CPU Split axes now produce an error instead of being accepted.
Split
Upgrades 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.
ConstantLoopScan
Bounds 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.
LabelEncoder
Limits 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.
SplitScanGatherNDScatterNDSpaceToDepthDepthToSpaceCropConv
Hardens generation and attention input handling, including attention-attribute narrowing, BifurcationDetector inputs, generation subgraph shapes, and QEmbed segment inputs.
BifurcationDetectorBeamSearchQEmbed
Validates TreeEnsemble node references, bounds subtree comparison, rejects non-finite CPU RoiAlign coordinates, and requires ImageScaler bias to match channel count.
TreeEnsembleRoiAlignImageScaler
Adds an allowlist of safe LoRA adapter parameter data types, validates MatMulFpQ4 shape inputs, and checks MLAS blockwise quantization index ranges.
MatMulFpQ4
Hardens CUDA indexing and buffer-size arithmetic in MatMulNBits, RemovePadding, RotaryEmbedding, SparseAttention, Whisper beam search, NMS, QDQ, and GatherElements.
MatMulNBitsRemovePaddingRotaryEmbeddingSparseAttentionGatherElements
Hardens graph optimizers against model-supplied indices and invalid fusion inputs, including MatMulNBits dequantization block sizes, GQA projection shapes, and Slice starts rank.
MatMulNBitsSlice
Fixes a path traversal vulnerability in TensorRT and NvTensorRTRTX engine refitting by making external-data path validation unconditional.
TensorRTNvTensorRTRTX
Validates the CPU MoE k attribute against the number of experts and fixes a CPU TensorScatter security issue.
MoETensorScatter
Adds missing rank, shape, and parameter validation for pooling, LSTM, DynamicQuantizeLSTM, Sampling, FeatureVectorizer, SkipLayerNorm, QLinearConv, Whisper decoding, RNN activations, GridSample…
LSTMDynamicQuantizeLSTMSamplingFeatureVectorizerSkipLayerNormQLinearConvGridSampleCropAndResize
Hardens CUDA indexing and buffer handling in GridSample, transpose, GatherBlockQuantized, InstanceNormalization, LayerNorm/RMSNorm, BeamSearch, DeformConv, AveragePool, and MaxPool.
GridSampleGatherBlockQuantizedInstanceNormalizationLayerNormRMSNormBeamSearchDeformConvAveragePool
Fixes packed sub-byte tensor over-copying in OrtApi::GetValue and validates DML constant tensor byte sizes.
OrtApi::GetValue
Updates npm lockfiles, refreshes the Next.js end-to-end fixture lockfile for security advisories, and upgrades adm-zip for onnxruntime-node.
adm-ziponnxruntime-node
Hardens 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_input
Fixes an out-of-bounds pointer in TensorAt for sub-byte packed types.
TensorAt
Fixes arbitrary memory read, out-of-bounds dereference and other OOB accesses in kernels.
Validates Col2Im inputs to prevent heap over-read.
Col2Im
Hardens CropAndResize against malformed crop_size tensors.
CropAndResizecrop_size
Validates BeamSearch vocab_size against logits width.
BeamSearchvocab_size
Fixes bounds in WhisperDecoderSubgraph::CreateInitialFeeds.
WhisperDecoderSubgraph::CreateInitialFeeds
Validates SparseAttention CSR indices and key lengths and rejects zero-dimension block_row_indices.
SparseAttentionblock_row_indices
Clamps derived sequence lengths and KV-cache index in CUDA GroupQueryAttention and fixes a CPU GQA out-of-bounds read in the past-KV buffer.
GroupQueryAttention
Clamps 1D attention mask_index to valid bounds.
mask_index
Validates MaxpoolWithMask kernel rank against input spatial rank.
MaxpoolWithMask
Rejects CUDA BERT EmbedLayerNorm and SkipLayerNorm shapes exceeding 32-bit output indexing.
EmbedLayerNormSkipLayerNorm
Fixes the optional-output guard in DecoderAttention and MultiHeadAttention shape inference and negative-axis handling in ExpandDims shape inference.
DecoderAttentionMultiHeadAttentionExpandDims
Fixes TreeEnsemble target id validation and adds input validation to LinearClassifier.
TreeEnsembleLinearClassifier
Fixes zero-point and scale validation typos in DynamicQuantizeLSTM.
DynamicQuantizeLSTM
Handles non-trivially-copyable types in Loop and Scan output concatenation.
LoopScan
Normalizes bool tensor raw_data to {0, 1} when unpacking.
raw_data
Addresses hardening gaps in Resize, PadFusion, and LoRA handling.
ResizePadFusionLoRA
Fixes unbounded lifetime on WithOutputTensor in the Rust bindings.
WithOutputTensor
Guards MlasConvPrepare working-buffer products and ConvTranspose pad computation with SafeInt.
MlasConvPrepareConvTransposeSafeInt
Fixes signed-int overflow in SamplingState::Init that could cause a heap buffer overflow.
SamplingState::Init
Hardens QMoE against integer overflow and partial K tiles.
QMoE
Validates B, scales, and zero-points shapes in MatMulNBits::PrePack.
MatMulNBits::PrePack
Pre-checks ConstantOfShape output size against the input initializer before constant folding.
ConstantOfShape
Fixes integer overflow in RKNPU implicit bias allocation.
RKNPU
Fixes WebGPU out-of-bounds reads in Pad, Slice, and GatherBlockQuantized.
PadSliceGatherBlockQuantized
Updates protobuf to mitigate CVE-2026-0994 and bumps ONNX/protobuf to fix additional CVEs.
protobufONNX
Avoids shell injection in the training helper and switches Triton compile helpers to subprocess.
subprocess
Validates 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.
BinSkim
Bumps npm dependencies shell-quote, esbuild, tmp, ws, protobufjs, js-yaml, tar, markdown-it, and @babel/core.
shell-quoteesbuildtmpwsprotobufjsjs-yamltarmarkdown-it
Fixes out-of-bounds read in SoftmaxCrossEntropyLoss via label bounds validation.
SoftmaxCrossEntropyLoss
Hardens OneHot input validation and output-size computation.
OneHot
Adds SafeInt overflow protection in Expand and caps constant-folding output sizes.
ExpandSafeInt
Bounds total output allocation size in the Tile kernel.
Tile
Adds mask/input shape consistency checks in MaxpoolWithMask::Compute.
MaxpoolWithMask::Compute
Fixes BitShift undefined behavior for shift amounts greater than or equal to bit width.
BitShift
Validates sequence bounds in GQA (seqlens_k vs cos_cache).
GQAseqlens_kcos_cache
Validates conv bias shape in WordConvEmbedding to prevent out-of-bounds reads.
WordConvEmbedding
Fixes int32 overflow in CUDA Cast and UnaryElementWise kernels for very large tensors.
CastUnaryElementWise
Fixes out-of-bounds read in CropBase scale handling.
CropBase
Fixes rank-underflow bug in Inverse kernel trailing-dimension indexing.
Inverse
Adds sparse tensor external file path validation and additional external-path hardening.
Switches remaining torch.load() calls to weights_only=True.
torch.load()weights_only
Adds 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.
setattr
Hardens multiple OOB and overflow scenarios across ML and core ops.
Fixes Attention mask index OOB write.
Attention
Adds MaxPoolGrad indices bounds validation.
MaxPoolGrad
Applies SVM and TreeEnsemble bounds and security fixes.
SVMTreeEnsemble
Fixes RNN sequence_lens OOB read and integer overflow handling.
RNNsequence_lens
Adds GroupQueryAttention seqlens_k bounds validation and a compatibility follow-up.
GroupQueryAttentionseqlens_k
Adds MatMulBnb4 and ML coefficient SafeInt checks.
MatMulBnb4SafeInt
Fixes CUDA Gather int32 overflow.
Gather
Hardens GridSample float to int64 cast for NaN, Inf and out-of-range coordinates.
GridSample
Adds position ID bounds validation in WebGPU/JS RotaryEmbedding.
RotaryEmbedding
Fixed 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::TensorProto
Cleaned 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_requires
Python 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.
Deprecated7
Deprecates the ACL EP, which will be removed in a future release; source builds using --use_acl now receive a deprecation warning.
--use_acl
onnxruntime-web deprecates WebGL and JSEP; the native WebGPU EP is the recommended path going forward.
WebGLJSEPWebGPU EP
Deprecates SkipLayerNorm strict mode.
SkipLayerNorm
CUDA 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.