Defend against MIME / content-type sniffing: enforce X-Content-Type-Options nosniff, accurate Content-Type, safe user-upload serve paths, and polyglot body risks that browsers re-interpret as HTML/script. Use when hardening or auditing response headers for user content, static hosts, CDN file origins, missing nosniff, wrong MIME on uploads, or MIME-confusion XSS on owned apps and authorized assessments.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Defend against MIME / content-type sniffing: enforce X-Content-Type-Options nosniff, accurate Content-Type, safe user-upload serve paths, and polyglot body risks that browsers re-interpret as HTML/script. Use when hardening or auditing response headers for user content, static hosts, CDN file origins, missing nosniff, wrong MIME on uploads, or MIME-confusion XSS on owned apps and authorized assessments.
Content-Type Sniffing Defense
Stop browsers from reinterpreting responses as HTML, script, or media other
than the declared type. Owns MIME correctness + nosniff + serve-time policy.
Storage keys/AV → file-upload-secure-storage. Disposition / download →
download-attribute-security. Script execution impact → xss-cross-site-scripting.
Scope And Authorization
In scope: Owned apps, labs, CTFs, written-scope review of response headers,
user-file hosts, CDN/object GET, exports, previews that may sniff or mislabel.
Out of scope: Drive-by malware, phishing, or third-party origins without
authorization.
Prefer canary bodies (MIME-SNIFF-CANARY-<uuid>) and lab browser profiles.
Prove sniff/execute with markers only. Keep originals immutable; store captures
under derived paths. Redact cookies, signed URLs, tokens, PII. Do not infer
authorization from sandbox-looking UIs.
When To Use
Missing X-Content-Type-Options: nosniff (site-wide or on user-content hosts).
Served Content-Type is wrong, generic (text/plain, application/octet-stream),
client-supplied, or disagrees with magic/extension.
User uploads (HTML, SVG, XML, PDF, images) re-served inline on the app
cookie origin without isolation.
Polyglot/dual-parse files may be treated as HTML/JS when type/nosniff is weak.
Hardening: global nosniff, fixed server MIME map, attachment defaults, separate
file origin, tests that canary HTML never runs on the app origin.
Not primary: storage/AV/noexec → file-upload-secure-storage; disposition /
HTML download → download-attribute-security; full XSS sink mapping →
xss-cross-site-scripting; zip extract → zip-slip-path-safety; edge-only
header inventory → nginx-security-headers (use this for MIME/sniff depth).
Multi-format bodies (image+HTML, PDF gadgets) may bypass naïve extension checks.
Defense-in-depth: magic+ext at store; fixed serve type + nosniff; separate
origin; re-encode images; no inline SVG on app origin.
Deep ingest dual-parse → file-upload-polyglot-detection. This skill covers
serve-time sniff outcomes when polyglot bytes reach the browser.
6. Prove impact and remediate
Lab-only: serve canary HTML/SVG under mislabeled type; check execute vs download
vs blocked with/without nosniff on target origin.
Script in victim session → MIME-confusion XSS; hand exploit depth to
xss-cross-site-scripting; keep header/MIME fixes here.
With code-quality-standards: always set nosniff; Content-Type from server map
only; untrusted default attachment; isolate user-content host; test missing
nosniff, wrong MIME, and “canary HTML must not run on app origin.”