Skip to main content
Security guideReviewed

File upload vulnerability: what your server accepts, keeps and hands back

An upload feature lets a stranger put a file on your server.

This guide covers what the server should accept, how it decides what a file is, where it stores it, what it names it and how it serves it back, with a harmless fixture set, a four-check verification table and a local Node.js lab with a regression test.

Upload fixture set, verification table and Node.js lab

An illustration for learning and for testing an upload feature you own. Part 1 is a harmless fixture set in four groups: renamed extensions, mismatched content types, oversized files and archive entries.

How to use it

Part 2 is a four-check verification table for server-side inspection, generated names, isolated storage and safe download headers, with the evidence to keep and the source behind each check. Parts 3 to 5 are a local Node.js lab, a photo upload feature in a flawed and a fixed version with a runner, an archive check and a regression test, run as shown on Node.js 26.0.0.

file-upload-security.txt

Introduction11 lines

ILLUSTRATION FOR LEARNING. The photo upload feature, its two versions and every fixture below were written for this page. They are not a client's code or a client's result. Use the fixtures and the lab to learn, and to test an upload feature you own or are authorised in writing to test, on a test or staging copy where you can. Written and run on: Node.js v26.0.0 on macOS, the only version it was run on. It uses only modules that ship with Node.js (node:http, node:crypto, node:fs, node:os, node:path, node:zlib, node:test and node:assert), so there is nothing to install. zlib.crc32(), which fixtures.mjs uses, was added in Node.js 22.2.0 and 20.15.0. Every output below was copied from that run by a script. Stack trace lines that held local file paths were removed, and each removal is marked. Ports are picked by the system and never printed, stored names are random, and test timings vary, so your output will differ in those places. Source names used below: ASVS OWASP Application Security Verification Standard 5.0.0, chapter V5 File Handling. The level follows each requirement number. CWE MITRE CWE version 5.0: CWE-434 Unrestricted Upload of File with Dangerous Type, CWE-646 Reliance on File Name or Extension of Externally-Supplied File WSTG OWASP Web Security Testing Guide v4.2: WSTG-BUSL-08 Test Upload of Unexpected File Types, WSTG-BUSL-09 Test Upload of Malicious Files OWASP CS OWASP File Upload Cheat Sheet OWASP UFU OWASP Unrestricted File Upload MDN MDN Web Docs pages for X-Content-Type-Options, Content-Disposition, the CSP guide and the CSP sandbox directive

What a file upload vulnerability is

An upload feature is a way for a stranger to put a file on your server.

A profile photo, a CV on a careers form, an invoice attached to a quote request: in each case someone outside your business chooses the bytes, the name and the type the file claims to be, and your server keeps the result. OWASP's page on unrestricted file upload puts it plainly: the first step in many attacks is to get some code onto the system being attacked, the attack then only needs a way to get that code run, and a file upload helps with the first step.

A file upload vulnerability is any way that file, or what the server does with it, causes harm. OWASP lists consequences including complete system takeover, an overloaded file system or database, attacks forwarded to back-end systems, client-side attacks and simple defacement, and says which one applies depends on what the application does with the file and especially where it is stored.

It separates two kinds of problem: the file's metadata, such as its path and name, which can trick an application into overwriting a critical file or storing the file in a bad location, and the file's size or content.

MITRE catalogues the weakness as CWE-434, Unrestricted Upload of File with Dangerous Type: the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. MITRE lists unrestricted file upload as an alternate term and calls that phrase insufficiently precise, because it could be read as a lack of limits on the size or number of uploaded files, which is a resource consumption issue.

This guide covers both meanings: what the server accepts, how it decides what a file is, where it puts it, what it calls it and how it hands it back.

Neighbouring guides in this library take the rest. When a server runs a stored file as code, the remote code execution guide covers what that process can then reach. File names that climb out of a folder, and archive entries that do the same on extraction, belong to the path traversal guide.

The web server settings that decide what may run inside an upload folder are a security misconfiguration question. Uploaded files that the wrong people can open are a sensitive data exposure question. The WordPress guide covers that platform's roles and plugins beyond the upload handler.

Content type validation: the name, extension and type are all claims

Every detail that arrives with an upload comes from the uploader.

In a browser form, the file travels as one part of a multipart/form-data body, and its name arrives as the filename parameter of that part's Content-Disposition header. MDN describes that parameter as the original name of the file transmitted, providing mostly indicative information, and repeats RFC 2183's advice to strip any path information and not to overwrite an existing file.

Nothing obliges the sender to use your form: OWASP's unrestricted upload page notes that a check on the request's Content-Type header can be bypassed by changing the header with a web proxy.

OWASP's File Upload Cheat Sheet is direct about the declared type. The Content-Type for uploaded files is provided by the user, cannot be trusted and is trivial to spoof. It still gives that check a job: it should not be relied on for security, but it is a quick check that stops people uploading a file of the wrong type by mistake.

The extension is a claim too. The WHATWG MIME Sniffing Standard says file extensions are not used to determine the supplied MIME type of a resource retrieved over HTTP because they are unreliable and easily spoofed. MITRE has a separate weakness for trusting them, CWE-646: an upload feature that relies on the file name or extension to decide what to do with a file, which attackers could use to have the file misclassified and processed in a dangerous fashion.

Its mitigation is to make decisions on the server side based on file content and not on file name or extension.

Where an extension is checked, the check has known weak points. The cheat sheet asks for validation after the file name has been decoded, and lists bypasses to filter against, including double extensions, null bytes, changes of letter case, alternative extensions that a server may map to the same interpreter depending on its configuration, and Windows NTFS alternate data streams, for which it says to reject any file name containing a colon.

CWE-434 adds two of its own: allow only one extension in a file name, because some web servers, including some versions of Apache, may process files based on inner extensions, and compare extensions without regard to case when the web server supports case-insensitive file names.

The cheat sheet calls blocking specific extensions a weak protection method on its own, so start from an allow-list of the few types the feature needs.

Checks in the browser do not count. CWE-434 says to duplicate on the server side any security check performed on the client side, because attackers can change values after the check has run or remove the check entirely. WSTG-BUSL-08 lists three shortcuts to look for: checking the file type only in client-side JavaScript, only by the Content-Type of the request, or only by the extension.

The lab's flawed version shows what trusting the declared type does. It accepted R2, a text file named photo.png and declared image/png, and refused M1, a real PNG declared text/html. The fixed version did the opposite on both, because it ignores the declared type and decides from the extension and the bytes.

What checking the leading bytes proves, and what it does not

Some formats begin with a fixed sequence of bytes, which ASVS calls magic bytes and MDN calls magic numbers.

MDN's guide to MIME types gives two examples: GIF files start with 47 49 46 38 39 (GIF89) and PNG files with 89 50 4E 47. The MIME Sniffing Standard's pattern table gives the full eight-byte PNG signature, 89 50 4E 47 0D 0A 1A 0A, which is what the lab's fixed version compares.

Reading those bytes on the server is a check that a renamed text file cannot pass: R2 and R4, text files whose names end in .png, were refused because their first bytes were text.

What the check proves is narrow. It confirms that the first eight bytes match and says nothing about the rest of the file. MDN notes that not all file types have magic numbers, so inferring a type from bytes is not completely reliable either.

OWASP's cheat sheet describes a signature check as one to run in conjunction with content-type validation, and says it should not be used on its own, as bypassing it is pretty common and easy.

OWASP's unrestricted upload page explains why: a check that reads only the first few characters can be passed by putting other content after a valid header or inside the file's metadata. CWE-434 says not to rely exclusively on sanity checks of file contents, since it may be possible to hide code in parts of a file that the server will still execute, and gives the free-form comment field in GIF images as an example.

Fixture M2 shows the limit. It is the PNG signature followed by a line of marker text, named photo.png and declared image/png, and the fixed version accepted it. That is the expected result, and it is why the next section matters more than this one.

M2 was stored under a generated name outside any served folder and came back as image/png with nosniff and attachment, so a browser that honours those headers uses the type as given and offers the file as a download rather than rendering it.

ASVS 5.0 requirement 5.2.2, at Level 1, asks for both halves: the extension must match an expected extension, and the contents must correspond to the type the extension represents, which includes, but is not limited to, checking the initial magic bytes, image re-writing and specialised libraries for file content validation.

At Level 1 this can focus on files used to make specific business or security decisions; from Level 2 up it applies to every file accepted.

The lab uses only modules that ship with Node.js, so it stops at the extension and the leading bytes; re-writing is covered in the section on images and documents below.

File upload security best practices: storage, names and download headers

OWASP's cheat sheet says there is no silver bullet in validating user content, that defence in depth is key, and that no one technique is enough to secure the service.

The controls that still hold when a file gets past a check are the ones about where it lives, what it is called and how it leaves, because they decide what a file that got through can do.

Store it where nothing is served or run

ASVS 5.0 requirement 5.3.1, at Level 1, asks that files uploaded or generated by untrusted input and stored in a public folder are not executed as server-side program code when requested directly over HTTP. 1 min read

Name it yourself

CWE-434's first mitigation is to generate a new, unique file name for an upload instead of using the user-supplied name, so that no external input is used at all, and it adds that generated names should end in one of a very limited set of allowed extensions. 1 min read

Serve it with headers that fix its meaning

A browser decides what to do with a file from the download response, not from the upload. 2 min read

Size limits, archives and decompression bombs

ASVS 5.2.1, at Level 1, asks that the application only accepts files of a size it can process without a loss of performance or a denial of service.

The limit has to hold while the body arrives, not only when a Content-Length header announces the size. S1 sent one byte over the lab's 65,536-byte limit with a Content-Length header, and the fixed version refused it with 413 without reading the body.

S2 sent 300,000 bytes in 16,384-byte pieces with no Content-Length, and the fixed version counted as it read, stopped keeping data once the count passed the limit at 81,920 bytes, and refused it.

The flawed version stored both. ASVS 5.2.4, at Level 3, adds a per-user quota on file size and the number of files, so one account cannot fill the storage.

Archives move the size that matters to after extraction. CWE-409 describes a product that does not handle, or incorrectly handles, compressed input with a very high compression ratio that produces a large output, and its first example is a decompression bomb, a small ZIP file that can produce a large amount of data when it is decompressed.

WSTG-BUSL-09 says such a file is intended to cause a denial of service by exhausting the disk space or memory of the system that extracts it, that formats other than Zip, including gzip, are affected too, and that a successful attack can also raise costs on an auto-scaling cloud platform.

It says not to carry out this kind of attack without considering those risks and getting written approval.

The lab stays modest by design: A2, the archive that unpacks the most, is 3,957 bytes packed and holds 1,560,000 bytes of marker text, enough to cross the lab's limit.

ASVS 5.2.3, at Level 2, asks that compressed files, such as zip, gz, docx and odt, are checked against a maximum uncompressed size and a maximum number of files before they are uncompressed. ASVS 5.2.5, at Level 3, asks that archives containing symlinks are refused unless they are specifically required, and that an allowlist then limits which files they can link to.

ASVS 5.3.3, also Level 3, asks that server-side processing such as decompression ignores user-provided path information to prevent vulnerabilities such as zip slip. The cheat sheet adds that where a system extracts or processes files, the size limit should be considered after decompression, using secure methods to calculate zip file sizes, and OWASP's unrestricted upload page says that where an application extracts compressed files, each file inside should be checked one by one as a new file.

The lab's archive check works in two stages and never writes a file. The first reads the list of entries the archive declares and refuses it if there are more than 100 entries, if any name is absolute, contains a backslash or a colon, or climbs out of the folder with .., or if the listed sizes add up to more than 1,000,000 bytes.

That refused A1, A2 and A3 before anything was inflated, and passed A4.

The listed sizes are written by whoever made the archive, so the second stage inflates each entry in memory with zlib's maxOutputLength option, which the Node.js documentation says limits output size when using the convenience methods, set one byte above the remaining budget.

Run on its own against A2's entry, it stopped with ERR_BUFFER_TOO_LARGE, and the regression test edits a modest archive so its listing understates its entry's size, which the second stage also stopped.

The fixed upload endpoint refuses archives outright, in line with the cheat sheet, which does not recommend ZIP files because they can contain all types of files and the attack vectors pertaining to them are numerous. The archive check is for features that have to take archives, and it runs before extraction, not instead of the checks on each extracted file.

Malicious file uploads: what scanning adds and where it stops

WSTG-BUSL-09, Test Upload of Malicious Files, starts where type checks end: a file of an accepted type can still be malicious.

It notes that restrictions based on a list of permitted or blocked extensions are not sufficient to stop legitimate file types with malicious contents, that malicious means different things to different systems, and that malicious files could be detected and stopped at various points, including intrusion detection or prevention, anti-virus software on the application server, or scanning by the application as files are uploaded.

ASVS 5.4.3, at Level 2, asks that files obtained from untrusted sources are scanned by antivirus scanners to prevent serving of known malicious content. The requirement's own words set its scope: known malicious content. The cheat sheet lists running a file through an antivirus or a sandbox, if available, among its principles, along with Content Disarm and Reconstruct for applicable types such as PDF and DOCX.

It also notes that some services scan files against well known malicious file hashes, and warns about data leakage threats and information gathering by public services, so think before sending customers' files to one.

The scanner is also software that reads untrusted files. OWASP's unrestricted upload page says uploaded files might trigger vulnerabilities in broken real-time monitoring tools, with an antivirus exploited by unpacking a RAR file as its example, and CWE-434 notes that the weakness can overlap with interpretation errors in intermediaries, such as anti-virus products that do not remove or quarantine attachments with certain file extensions.

WSTG-BUSL-09 adds that, depending on how the application processes a file, it may not be obvious whether a malicious file was detected and quarantined or deleted. Treat scanning as one layer on top of the type decision, the storage and the download headers, and keep a record of each verdict so you can show a file was checked. The fixture set contains no scanner test files; to confirm scanning runs, follow your scanner's own documentation.

Images and documents that can carry active content

Some formats people think of as passive are not.

MDN documents a script element for SVG, which allows you to add scripts to an SVG document. WSTG-BUSL-08's example is a picture-sharing site that accepts .gif and .jpg files, and it asks what happens if an attacker uploads an HTML file with a script tag in it.

CWE-434 says to consider cross-site scripting before allowing .html or .htm file types. If a feature does not need SVG or HTML, leave them off the allow-list. If it does, serve them as attachments with nosniff and a sandbox policy, and consider a separate domain for them, an option OWASP's unrestricted upload page raises for serving uploaded files. Script that runs inside one of your own pages is the subject of the XSS guide.

For images, the cheat sheet's advice is to decode and re-encode to an allowed image format, explicitly removing unnecessary metadata. It is candid about the limits: rewriting may not remove all malicious content, and the image processor itself handles untrusted input, so use an up-to-date library with restricted formats, resource limits and sandboxing.

The documentation for sharp, a Node.js image library, shows what those settings look like: by default all metadata is removed from output images; limitInputPixels refuses input images whose width times height exceeds a limit, which is on by default and assumes the dimensions in the input metadata can be trusted; and the failOn option should stay at its default, warning, for untrusted input.

ASVS 5.2.6, at Level 3, asks the application to reject images with a pixel size larger than the maximum allowed, to prevent pixel flood attacks.

Documents carry their own risks. WSTG-BUSL-09 notes that CSV files may allow CSV injection attacks, Office files may contain malicious macros or PowerShell code, and PDFs may contain malicious JavaScript. The cheat sheet suggests Content Disarm and Reconstruct for applicable types such as PDF and DOCX, and Apache POI for validating Microsoft documents, and ASVS 5.2.3 counts docx and odt among the compressed files whose unpacked size and file count it asks you to check.

Serving documents as attachments matters here too: OWASP's unrestricted upload page says the attachment and nosniff headers mitigate PDF-based cross-site content hijacking, especially when PDF uploads are permitted.

File uploads on WordPress sites

WordPress handles uploads in core, and its developer reference shows what the core path does.

Uploading starts with a capability: the default Author role holds upload_files, and the Contributor role does not. The core handler, _wp_handle_upload(), sanitises file names, checks extensions for mime type and moves the file into the uploads directory, and on success returns the file name, its URL and its type.

With its type test on, which is the default, it asks wp_check_filetype_and_ext() for the file's type, and when no allowed extension and type match it refuses the upload with "Sorry, you are not allowed to upload this file type.", unless the user holds the unfiltered_upload capability.

wp_check_filetype_and_ext() attempts to determine a file's real type, and if it cannot, uses the file name's extension. When it finds that an extension does not match the real type it can supply a corrected name, though for now only for images validated by wp_get_image_mime(). The allowed list comes from get_allowed_mime_types(), which starts from wp_get_mime_types(), removes swf and exe, removes htm|html and js for users without the unfiltered_html capability, and passes the list through the upload_mimes filter, where plugins and themes can change it.

The list in wp_get_mime_types() has no SVG entry, so a site that accepts SVG uploads through core has changed something: added the type with a filter, had code pass the upload handler its own list of types or switch off its type check, or given the uploading user the unfiltered_upload capability.

unfiltered_upload is a special case. WordPress's roles documentation says it is not available to any role by default, including Super Admins, and needs to be enabled by defining the constant ALLOW_UNFILTERED_UPLOADS as true; with the constant defined, any role on a single site can be given the capability, and on Multisite only Super Admins can. Check wp-config.php for that constant, and if it is there, check who holds the capability.

Core is not the only upload path. Plugins can add upload fields of their own, so test each one with the fixtures rather than assuming it goes through core. Because core hands back a URL for each upload, the server settings for the uploads folder decide whether a stored file could ever run as code, which is the concern of ASVS 5.3.1.

The Clever Ops WordPress security audit tests each upload path with files that are not what their extension claims, such as SVG or HTML content, to see what the server stores and serves back to other users, and the WordPress guide covers the roles and plugins behind those paths.

Uploads to object storage, with Amazon S3 as the example

Some applications let the browser send files straight to object storage, so the file never passes through the application server.

On Amazon S3 that is done with a presigned URL, which AWS documents as a way to let someone upload a specific object without needing AWS credentials of their own. The controls above still apply, but three details from AWS's documentation change where they sit.

The key is the stored name

If an object with the same key already exists, S3 replaces it with the upload, and a presigned URL can be used more than once until it expires. Generate the key on your server for each upload, never from the uploaded file name, and consider PutObject's If-None-Match condition, which uploads the object only if the key does not already exist and otherwise returns 412 Precondition Failed.

AWS also describes presigned URLs as bearer tokens that grant access to whoever holds them, so issue one per upload and protect it as AWS recommends.

The stored type is still a claim

S3's metadata documentation lists Content-Type and Content-Disposition among the system-defined metadata whose values the user can modify, and PutObject takes Content-Type as a request header. The type stored with an object is the one its upload request set, which is the same claim as before, now kept beside the file.

The bytes also never passed through your code, so treat a new object as unchecked until your server has read its leading bytes, its size and, for an archive, its listing, and only then move it under a new key to where downloads come from.

Downloads come from a private bucket with signed links

AWS says new buckets, access points and objects do not allow public access by default, that policies and permissions can open them, and that Block Public Access settings override those policies and permissions. A signed GetObject request can override the response's Content-Disposition and Content-Type with the response-content-disposition and response-content-type parameters; AWS says these cannot be used with an unsigned request and are included only in a successful 200 OK response.

That lets each download link ask for attachment and a fixed type.

Check what actually comes back, through any CDN in front of the bucket, with check 4 of the verification table, because the headers a browser receives are the ones that count.

File upload testing: fixtures, evidence and conduct

WSTG-BUSL-08 asks testers to prepare a library of files that are not approved for upload, submit them and confirm they are prevented, and to check whether the file type is only checked in client-side JavaScript, by the Content-Type or by the extension, whether uploaded files can be reached directly by URL, and whether a ZIP can carry paths that unpack files to an intended location.

WSTG-BUSL-09's objectives add determining how uploaded files are processed, and trying to upload malicious files to see whether they are accepted and processed. The fixture set on this page is a library of that kind built from harmless files: marker text, a real 1 by 1 pixel PNG, generated padding and archives of marker text. None of the files is a program, and none contains a scanner test file.

Use the fixtures on an upload feature you own, or one you are authorised in writing to test, on a test or staging copy where you can. Upload as a test account, keep a list of what you uploaded and where it was stored, and delete it afterwards.

Do not upload over a file you did not create: OWASP's unrestricted upload page warns that replacing configuration files such as web.config or .htaccess can lead to a denial of service for the whole website.

For size and archive limits, a modest generated file one step over the limit shows whether the limit holds.

For each fixture, keep the request (name, declared type, size and whether a Content-Length header was sent), the response status and reason, where the file was stored and under what name, and the full headers of its download. The verification table in the asset maps that evidence to four checks: server-side inspection, generated names, isolated storage and safe download headers, each with the source behind it.

In a Clever Ops web application and API penetration test, file uploads are in scope. Each upload point is tried with file types the business does not accept and with harmless files whose content does not match their extension, stored files are requested directly to see whether any is run as server-side code, and the processing that follows an upload, such as resizing an image or attaching a file to a generated PDF, is tried with harmless test files.

Whether another account can download an upload is tested as an access question.

If Clever Ops built or hosts the application, the work is a security review rather than an independent test, and the report says who built it and who hosts it.

Running the lab and reading its results

The lab in the asset is an illustration written for this page.

It needs Node.js and nothing else: it uses only modules that ship with Node.js, binds to 127.0.0.1 on a port the operating system picks, writes only inside a temporary folder it creates, and removes that folder when it stops. The Node.js documentation says that when a server listens on port 0, the operating system assigns an arbitrary unused port.

The lab was run on Node.js v26.0.0 on macOS; zlib.crc32(), which builds the fixtures, was added in Node.js 22.2.0 and 20.15.0, and the documentation marks the test runner stable from 20.0.0.

To keep the server short and correct with built-in modules only, the lab takes uploads as POST /upload?name=FILE_NAME, with the file's bytes as the whole request body and the declared type in the Content-Type header. A browser form sends the same three claims in a multipart/form-data part instead, so the checks are the same.

S2 is written in pieces with no Content-Length header; the Node.js documentation says sending a Content-Length header disables the default chunked encoding, so without one node:http sends the body chunked.

In the output of run-fixtures.mjs, the flawed version accepted 14 of the 15 fixtures, refusing only M1 because its declared type was text/html. It stored each under the uploaded name in its public folder, served R3 and M3 as text/html because their names ended in .html, served R5 and R6 with no Content-Type because its type table was case-sensitive, and sent none of nosniff, Content-Disposition or a Content-Security-Policy with any download.

The fixed version accepted four: R1, R5, M1 and M2.

Each was stored under a generated name in a folder no route serves, came back from /files/ with image/png, nosniff, attachment and sandbox, and answered 404 when requested by its stored name.

The regression test, upload.test.mjs, runs ten checks on Node's built-in test runner. Against the fixed version all ten passed and the process exited with code 0. Against the flawed version seven failed and the exit code was 1; the Node.js documentation says the process exit code is set to 1 when any test fails, which is what lets a pipeline step stop a deploy.

Checks 1, 9 and 10 pass on both: the first confirms a real PNG still gets through, so the fixed version is not passing by refusing everything, and the last two test the archive check, which both versions share.

Frequently asked questions

It is any way a file someone uploads, or what your server does with it, causes harm: code run on the server, a page that runs script in other visitors' browsers, a file that overwrites another, storage filled up, or private files reachable by the wrong people. MITRE catalogues the core weakness as CWE-434, the upload of dangerous file types that are automatically processed within the product's environment. The fixes sit in five places: what the server accepts, how it decides what a file is, where it stores it, what it names it and how it serves it back.

MITRE lists unrestricted file upload as an alternate term for CWE-434, Unrestricted Upload of File with Dangerous Type, and calls the phrase insufficiently precise: it could be read as a lack of limits on the size or number of uploaded files, which is a resource consumption issue. Both meanings need fixing. Type, storage and serving controls deal with the dangerous file, and size limits, per-user quotas and archive checks deal with the volume.

No. The extension is chosen by the uploader, and the WHATWG MIME Sniffing Standard calls extensions unreliable and easily spoofed. ASVS 5.2.2 asks for the extension to match an expected one and the contents to match the type it represents, and OWASP's cheat sheet calls blocking extensions a weak protection on its own. In the lab, a text file named photo.png got past the flawed version, which trusted names and declared types, and was refused by the fixed one, which reads the leading bytes.

They prove the first few bytes match a signature, and nothing about the rest. OWASP's cheat sheet says a signature check should not be used on its own, as bypassing it is pretty common and easy, and MDN notes that not every file type has a magic number. The lab's fixture M2, a PNG signature followed by marker text, passed the fixed version's check. What kept it harmless was the generated name, storage outside any served folder, and a download sent as image/png with nosniff and attachment.

ASVS 5.4.3, a Level 2 requirement, asks for files from untrusted sources to be scanned by antivirus scanners to prevent serving of known malicious content, and OWASP's cheat sheet lists an antivirus or a sandbox where available. Scanning covers known content, and the scanner itself reads untrusted files, so treat it as one layer beside the type decision, the storage and the download headers, not a replacement for them.

Use harmless fixtures like the ones on this page: marker text with misleading names and types, a real tiny image, generated padding one step over the size limit, and small archives of marker text. Test a feature you own or are authorised in writing to test, on a staging copy where you can, as a test account, and delete what you uploaded afterwards. Do not upload over existing files, and record each request, response, stored location and download header as evidence.

Scope the right test for your application

Tell us what you have built, who uses it and when it needs to launch. You will get a plain-English recommendation: a website audit, a web application test or a referral to a specialist.