
Exploits CVE-2026-21005 by poisoning Docker Registry V2 Schema 1 manifests via unauthenticated pushes, enabling tag overwrite and supply-chain compromise.
# docker_registry_sim.py - Simulated registry that serves schema1 manifests
from flask import Flask, request, jsonify
app = Flask(__name__)
images = {
'myapp': {
'v1': {'layers': ['sha256:abc', 'sha256:def'], 'config': {}},
}
}
@app.route('/v2/<name>/manifests/<tag>', methods=['GET', 'PUT'])
def manifest(name, tag):
if request.method == 'PUT':
images[name][tag] = request.json
return jsonify({}), 201
return jsonify(images[name].get(tag, {}))
if __name__ == '__main__':
app.run(port=5000)
A private Docker registry accepts push requests without authentication and uses Schema 1 manifests, which do not include a content‑addressable configuration digest. An attacker can overwrite an existing tag with a malicious image, and clients pulling that tag will run the attacker’s code.
pip install flask
python docker_registry_sim.py
bash exploit_registry_poison.sh
The tag latest is overwritten.