November 12, 2026
When Client-Side Limits Are Not Enough: Bypassing File Upload Restrictions
File upload restrictions are common in web applications. They help control file sizes and the number of files users can upload. But are…

By Shahd mourad
1 min read
File upload restrictions are common in web applications. They help control file sizes and the number of files users can upload. But are these restrictions always enforced on the server side?
During a security test, I found a case where modifying client-side configuration values allowed me to bypass the original file upload restrictions.
Here's how it worked. Understanding the Issue
The application used an API endpoint to return file upload configuration values, including:
"maxFileSizeLimit": Maximum allowed file size. "maxFilesPerEntity": Maximum number of files allowed.
The frontend used these values to control the upload process.
At first, everything looked normal. However, I wanted to check whether these restrictions were also enforced by the backend. The Testing Process I started by monitoring the application's requests using Burp Suite. I found the API response responsible for returning the upload configuration.
Using Burp Suite's Match and Replace feature, I modified the returned values to increase the allowed file size and number of files. After refreshing the page, the frontend accepted the modified configuration.
I then tried uploading files that exceeded the original restrictions. The upload was successful.
This showed that the backend was not properly enforcing the original limits.
Why Does This Matter?
Client-side validation is useful, but it should never be trusted as a security control. Users can modify client-side behaviour using browser developer tools or intercepting proxies. If the backend does not independently validate these restrictions, users may bypass the intended limits.
Depending on the application's implementation, this could lead to:
- Uncontrolled storage consumption.
- Increased infrastructure costs.
- Bypassing business restrictions.
- Potential service availability issues.
How Can This Be Prevented? The solution is simple: enforce all important restrictions on the server side.
The backend should independently check:
- Maximum file size.
- Maximum number of uploaded files.
- Allowed file types.
- User permissions. The server must never rely on client-side values to make security decisions.
Final Thoughts This finding is a good reminder that frontend restrictions are not security boundaries. Whenever you encounter configuration values related to limits or permissions, try to understand how the backend handles them. A restriction is only effective when the server actually enforces it. Never trust the client. Always verify on the server