I.5The modeldefense
The model artifact & its supply chain
Authorized use only Defensive and educational material, for authorized testing and sanctioned engagements. Run techniques only against systems you own or are explicitly permitted to assess.
The AI supply chain is broader than software’s - data, weights, code, and infrastructure, most of it pulled from public hubs on implicit trust - so the load-bearing question becomes “is this the artifact the author actually built, unmodified?”
The four links in that chain:
| Link | What it covers |
|---|---|
| Data | Pre-train, fine-tune, RAG (retrieval-augmented generation) corpora - see I.3 |
| Weights | Base models, adapters, quantizations |
| Code | Frameworks, MLOps, connectors |
| Infrastructure | Serving, vector stores, GPUs |
Most of it is pulled from public hubs with implicit trust.
Model files are code
A pickled checkpoint executes arbitrary code on load - downloading a model is running a stranger’s program (I.4 · Adversarial machine learning). Safer formats (safetensors) and scanners help - modelscan (Protect AI), fickling and picklescan flag unsafe pickle opcodes and embedded code before load - but unsafe deserialization remains a top hub risk, and weights themselves can be backdoored (Sleeper Agents, II.2 · Prompt injection & the LLM attack surface) which no format check detects. Because a model file can carry code, “is this the model the author actually built, unmodified?” becomes a load-bearing question - the provenance problem the software world solved for packages, now applied to weights and datasets.
Registry, dependency & MLOps risk
# 1) SCAN for unsafe deserialization / embedded code in weights# modelscan (Protect AI) - flags os.system, exec, GLOBAL opcodes, etc.pip install modelscanmodelscan -p ./<org>__<model>/pytorch_model.binmodelscan -p ./<org>__<model>/ -r json -o modelscan-report.json
# fickling - decompile a pickle to inspect its opcodes / detect payloadspip install ficklingfickling --check-safety ./<model>.pklfickling ./<model>.pkl # dump the pickled program to read it
# 2) PREFER safetensors; if a .bin/.pt ships instead, treat as suspiciouspython -c "from safetensors.torch import load_file; load_file('model.safetensors')"
# 3) VERIFY provenance (OpenSSF Model Signing, Sigstore-backed)pip install model-signingmodel_signing verify ./<model>/ \ --signature ./<model>/model.sig \ --identity <builder@org.com> \ --identity_provider https://accounts.google.com
# Typosquat / dependency-confusion note: publishing a squat of huggingface_hub# (e.g. huggingface-hubs) whose postinstall runs code, or a backdoored fork# <org>/llama-3-8b-instruct-v2, is the same class - pin hashes, mirror internally.Typosquatting and slopsquatting (LLMs hallucinate plausible package names attackers register) hit AI projects hard. MLOps infrastructure - experiment trackers, orchestrators, notebook servers - is often internet-exposed and under-hardened.
Infrastructure & deployment
Beneath the model: inference/serving endpoints, vector databases, container/Kubernetes orchestration, cloud configuration. Misconfigurations that look benign turn dangerous once AI workloads sit on them (exposed serving APIs, over-permissive IAM, unsecured vector stores). This is where most real-world breaches actually live, and it maps directly to the CSA advisory (VIII.6 · Jurisdictions - Singapore, the EU, the US & UK).
The findings that recur (your checklist)
Against a real MLOps estate, the same issues surface repeatedly:
- Unsigned / unverifiable model artifacts - no OMS/Sigstore signature to verify against.
- Unsafe-pickle weights loaded in CI -
.bin/.ptdeserialized with nomodelscangate. - Floating tags instead of pinned commit hashes - a moving supply-chain target.
- Production pulls direct from public hubs - no internal, scanned mirror.
- Exposed MLflow tracking server - remote unauthenticated file overwrite (CVE-2023-6018) & auth-bypass account creation (CVE-2023-6014), deserialization RCE (CVE-2024-37052 and the related CVE-2024-37053 through CVE-2024-37060), and - three years and multiple CVE classes later - still SSRF: CVE-2026-64849 (CVSS 9.3, unauthenticated, added to CISA KEV 19 Aug 2026) validated a webhook-test URL once, then followed redirects on delivery without pinning the validated address, reaching cloud metadata. Same lesson every time: an unauthenticated MLflow instance is not a dev convenience, it is a standing RCE/SSRF target.
- Exposed Ray dashboard - “ShadowRay” unauthenticated job-submission RCE (CVE-2023-48022), disputed by the vendor but actively exploited in the wild. A second Ray RCE, CVE-2025-62593 (a DNS-rebinding path reachable from a victim’s browser, CVSS 4.0 9.4), landed 26 Nov 2025 and is fixed in Ray 2.52.0 - patch past both.
- Kubeflow / Jupyter notebook servers without auth - unauthenticated code execution on the cluster.
nuclei -tags mlflow,ray,kubeflow -u https://<target-host>Integrity for the model artifact: signing, ML-BOM & provenance
That provenance question - “is this the model the author actually built, unmodified?” - is what the integrity tooling answers, and it matured quickly across 2025-2026:
- Model signing - the OpenSSF Model Signing (OMS) specification (OpenSSF, introduced June 2025), building on the model-signing library/CLI that reached v1.0 in April 2025 (Google’s open-source security team with NVIDIA and HiddenLayer), built on Sigstore: keyless, identity-based signatures logged in a public transparency log (Rekor), with a detached bundle binding a model to its author and a manifest of file hashes. It is integrated into NVIDIA NGC and Google Kaggle.
- Build & provenance levels - SLSA (“salsa”) gives a graded checklist for tamper-resistant build pipelines and verifiable provenance; Sigstore/Cosign supplies the signing and verification primitives.
- Bill of materials - a ML-BOM (machine-learning bill of materials) enumerates the model, its datasets, and dependencies; CycloneDX (OWASP; v1.7, Oct 2025) has carried ML-BOM since v1.5, and OWASP’s SCVS guides component verification.
- Documentation as metadata - Model Cards (Mitchell et al., 2019) record intended use, training data, and evaluation; the Coalition for Secure AI (CoSAI) is driving this toward tamper-proof, machine-readable metadata signed alongside the weights.