﻿# MONAI SENet advisory: restricted deserialization and download authenticity are separate fixes

Inspect MONAI’s pretrained SENet loading path and actual 1.6.1 change without assuming that the patched flag also changes HTTP transport or verifies the source.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/monai-senet-pretrained-http-weights-only-patch-boundary/
Language: en

MONAI's September 27, 2026 advisory concerns pretrained weights fetched by a model-construction path. Its most direct scenario combines plaintext transport with unrestricted pickle loading. Reading the affected and patched source reveals an important boundary: restricting deserialization is a specific improvement, while authenticating the downloaded artifact remains another task.

## Identify the reachable SENet branch

The [original project advisory](https://github.com/Project-MONAI/MONAI/security/advisories/GHSA-vm9c-7j6g-c7mm) lists MONAI versions through 1.6.0 and identifies 1.6.1 as patched. It describes execution during construction of a SENet model when pretrained weights are requested and an attacker can substitute the downloaded checkpoint.

In the [affected source](https://github.com/Project-MONAI/MONAI/blob/1.6.0/monai/networks/nets/senet.py), the built-in model registry contains string URLs. Those entries take the helper-loading branch. A neighboring branch already passes a restricted-loading flag, but it applies to a different entry type. Finding the flag somewhere in the function therefore does not establish protection for built-in models.

## Transport and deserialization compose the scenario

The built-in SENet URLs use HTTP. An on-path substitution is consequently a different threat from compromising a distribution account protected by authenticated transport. The advisory also identifies other pretrained-loader sites with omitted restrictions but HTTPS URLs; their prerequisite is different and should not be collapsed into the same immediate network scenario.

The [official PyTorch helper reference](https://docs.pytorch.org/docs/2.13/hub.html) shows that the relevant download-and-load helper defaults to unrestricted loading and does not enable its optional hash check by default. A fixed set of permitted model names limits URL selection; it does not independently validate the bytes returned by a permitted URL.

## Read the actual patched behavior

The [patched SENet source](https://github.com/Project-MONAI/MONAI/blob/1.6.1/monai/networks/nets/senet.py) explicitly passes weights_only=True in the reachable helper call. Comparing the two versions shows that specific change. The same inspected file retains its HTTP registry URLs and does not add a hash-check argument to that call.

Thus the demonstrated patch narrows deserialization; it should not be described as simultaneously migrating this path to HTTPS and authenticating every checkpoint. Those were additional hardening concerns in the advisory's discussion. A restricted tensor loader also does not guarantee that substituted numeric weights preserve model quality or expected behavior.

## Check caches and environments as part of provenance

The helper documentation says an already cached object can be deserialized instead of downloaded again. A runtime update and a fresh network transfer are therefore different events. Record the accepted artifact identity and cache ownership rather than assuming a new process necessarily obtained new verified bytes.

The [artifact-validation guide](/journal/safetensors-artifact-validation/) separates serialization, structure and producer trust. Apply the same distinction here: a compatible state dictionary can still have the wrong origin, while a correctly sourced checkpoint can fail because the environment or architecture is wrong. These cases need different evidence.

## Validate the corrected workflow without hostile execution

Use known reference artifacts to check that the selected patched runtime loads the intended weights and preserves representative outputs. Retain model variant, dependency versions, loader arguments and source identity. A successful construction test is a functional result, not proof that every possible replacement file is harmless.

The [reproducible-stack guide](/journal/software-stack-reproducibility/) supports that acceptance record. This case is specific to the reported pretrained pathways and should remain separate from earlier checkpoint-loader advisories. Its value lies in tracing the real branch and the actual fix, without turning a single flag into a claim of complete supply-chain protection.
