CVE-2026-47142: MantisBT: SQL Injection via history_order Configuration Value
MantisBT 2.28.3 and earlier versions contains a SQL injection vulnerability in core/historyapi.php. The historyorder configuration value is concatenated directly into a SQL ORDER BY clause without any sanitisation, parameterization, or validation against a whitelist. An administrator can set this configuration value via the web UI (admconfigset.php) or the REST API (PATCH /api/rest/config).
Published Jul 15, 2026
Affected packages
mantisbt/mantisbt
- Ecosystem
- Composer (PHP)
- Affected
- <= 2.28.3
- Fixed in
- 2.28.4
- Check
composer show mantisbt/mantisbt
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
MantisBT 2.28.3 and earlier versions contains a SQL injection vulnerability in core/history_api.php. The history_order configuration value is concatenated directly into a SQL ORDER BY clause without any sanitisation, parameterization, or validation against a whitelist.
An administrator can set this configuration value via the web UI (adm_config_set.php) or the REST API (PATCH /api/rest/config). The injected SQL then executes whenever any user views a bug with history entries.
Impact
- Sensitive data extraction from the entire bugtracker database including user credentials (cookie_string, password hashes), API tokens, and private issue data
- With MySQL FILE privilege: full RCE via INTO OUTFILE writing a PHP webshell to the web root
- The admin plants the payload once; any authenticated user viewing a bug with history triggers the injection
Patches
- https://github.com/mantisbt/mantisbt/commit/6ad20bea2e01f33c6e4170775ae4d9dbe2c75325
Workarounds
_Is there a way for users to fix or remediate the vulnerability without upgrading?_
Resources
- https://mantisbt.org/bugs/view.php?id=37123
Credits
McCaulay Hudson (@McCaulay) of watchTowr
Credited to McCaulay, dregad.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-47156
MantisBT: SOAP API Authentication Bypass with Privilege Escalation to Administrator
critical9.3Jul 15, 2026CVE-2026-49273
MantisBT: Remote Code Execution via eval() Class Hoisting in adm_config_set.php
high8.6Jul 15, 2026CVE-2026-49280
MantisBT: REST API unauthorized Issue status change
medium5.3Jul 15, 2026CVE-2026-52847
MantisBT: Reflected XSS in admin/install.php
critical9.2Jul 15, 2026CVE-2026-52881
MantisBT: Reflected XSS in admin/install.php via unescaped printf
critical9.2Jul 15, 2026CVE-2026-52882
MantisBT: REST and SOAP API Issue Update Accepts Unreleased Product Versions From Updaters
medium5.3Jul 15, 2026
