← ClaudeAtlas

auditing-file-upload-and-content-handlinglisted

Audit a file-upload and content-handling path for an attacker-supplied file whose bytes, declared type, name, or embedded content reach a sink that stores it in a served or executable location or feeds it to a parser that acts on its content, after the type-decision layer and the serve behavior are resolved. Covers an extension or content-type trusted for a type decision that a second layer contradicts, an SVG, HTML, or XML file stored and served inline as active content, image or document parser exploitation, a polyglot file passing one content check yet executing in another context, an upload path writing outside the intended directory, and an archive expanding to a write primitive. Use when reviewing upload validation, storage, and serving, not the client-side DOM sink or the archive-extraction write primitive their own skills own. An uploaded file is the source, a serve or parse sink acting on its content is the sink, and a type decision one layer contradicts is the bug.
UnboundCompute/security-agent-skills · ★ 27 · Data & Documents · score 80
Install: claude install-skill UnboundCompute/security-agent-skills
# Auditing file upload and content handling: when the type one layer trusts another layer contradicts A file upload becomes a vulnerability when the layer that decides a file's type disagrees with the layer that later serves or parses it. The upload validator trusts the extension or the declared content-type; the web server sniffs the bytes, or the storage path serves it inline, or a parser acts on embedded content, and the two disagreements meet in the attacker's favor. You audit it by resolving how the type is decided at upload and how the file is served and parsed afterward, then finding where those two views diverge. The strongest false-positive killers live in the serve layer: a no-execute sandboxed origin with a forced download, or a server-side re-encode, neutralizes the content regardless of its bytes. The client-side DOM sink and the archive-extraction write primitive have their own skills; this skill owns the upload-to-serve-or-parse decision. ## When to use - You are reviewing an upload endpoint, its type validation, where files are stored, and how they are served. - A file's bytes, declared type, name, or embedded content reach a parser, a renderer, or a served location. - You want to know whether an uploaded file executes or is parsed dangerously somewhere downstream. ## Scope check Audit only applications you own or are authorized to assess, and upload a crafted file only to a system in scope, a stored active file can execute against real users. Adjudicate