CVE-2005-4518
Description
Mantis before 0.19.4 allows remote attackers to bypass the file upload size restriction by modifying the max_file_size parameter to (1) bug_file_add.php, (2) bug_report.php, (3) bug_report_advanced_page.php, and (4) proj_doc_add_page.php.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
1Patches
Vulnerability mechanics
Root cause
"Server trusts client-supplied `max_file_size` parameter instead of enforcing the upload limit server-side."
Attack vector
An anonymous remote attacker can bypass the intended 2,000k file size restriction by modifying the `max_file_size` hidden form parameter in the POST request to an arbitrarily large value [ref_id=1]. The attacker sends a crafted multipart POST request to any of the four vulnerable upload scripts (bug_file_add.php, bug_report.php, bug_report_advanced_page.php, proj_doc_add_page.php) with the `max_file_size` parameter set to a value larger than 2000000 [ref_id=1]. Because the server trusts the client-provided size limit, the uploaded file is accepted and stored directly into the database, potentially filling available disk space and causing a denial of service [ref_id=1].
Affected code
The vulnerable upload forms are in bug_file_add.php, bug_report.php, bug_report_advanced_page.php, and proj_doc_add_page.php [ref_id=1]. These scripts accept a hidden form parameter `max_file_size` from the client to enforce upload limits, but do not validate or override the client-supplied value on the server side [ref_id=1].
What the fix does
The advisory states that the vendor released Mantis 0.19.4 (and 1.0.0rc4) to address these issues [ref_id=1]. No patch diff is provided in the bundle, but the fix would require the server to enforce the file size limit server-side rather than trusting the client-supplied `max_file_size` parameter, for example by checking the actual uploaded file size against a hardcoded or server-configured maximum before storing it in the database [ref_id=1].
Preconditions
- configFile upload functionality must be enabled in config_inc.php
- authNo authentication required; any anonymous user can exploit
- networkAttacker must be able to send HTTP POST requests to the vulnerable scripts
- inputAttacker modifies the 'max_file_size' form parameter in the POST body
Reproduction
Send a POST request to `[path_to_mantis]/bug_file_add.php` with a multipart form-data body containing `bug_id=1`, `max_file_size=999999999` (or any value larger than 2000000), and the file payload. The same technique applies to `bug_report.php`, `bug_report_advanced_page.php`, and `proj_doc_add_page.php` [ref_id=1].
Generated on May 26, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
10- secunia.com/advisories/18181/nvdPatch
- secunia.com/advisories/18221nvdPatch
- www.gentoo.org/security/en/glsa/glsa-200512-12.xmlnvdPatch
- www.securityfocus.com/bid/16046/nvdPatch
- www.trapkit.de/advisories/TKADV2005-11-002.txtnvdExploitPatch
- secunia.com/advisories/18481nvd
- sourceforge.net/project/shownotes.phpnvd
- www.debian.org/security/2005/dsa-944nvd
- www.osvdb.org/22056nvd
- www.vupen.com/english/advisories/2005/3064nvd
News mentions
0No linked articles in our index yet.