CVE-2026-47142: MantisBT SQL Injection Vulnerability
HIGHCVE-2026-47142 is a HIGH sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting MantisBT libraries in the Packagist ecosystem. The issue involves sql injection via history_order configuration value. Remediation is available by upgrading affected packages to version 2.28.4.
CVE-2026-47142 at a Glance
How to Fix CVE-2026-47142
To remediate this vulnerability, upgrade all affected MantisBT dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade mantisbt/mantisbt to 2.28.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for mantisbt/mantisbt
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-47142, inspect your project dependencies for MantisBT:
inspect dependencies for mantisbt/mantisbt
Analyze the terminal output to locate any version of MantisBT in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.28.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In MantisBT, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-47142 Affected MantisBT Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mantisbt/mantisbt
|
Packagist |
< 2.28.4
|
2.28.4
|
References
Frequently Asked Questions
What is CVE-2026-47142?
Which MantisBT versions are affected?
What version fixes CVE-2026-47142?
Is mantisbt/mantisbt affected?
What CWE is associated with CVE-2026-47142?
How can I check Packagist dependencies for CVE-2026-47142?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mw6p-33vw-46cc",
"modified" : "2026-07-15T16:38:22Z",
"published" : "2026-07-15T16:38:22Z",
"aliases" : [ "CVE-2026-47142" ],
"summary" : "MantisBT: SQL Injection via history_order Configuration Value",
"details" : "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.\n\nAn 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.\n\n### Impact\n- Sensitive data extraction from the entire bugtracker database including user credentials (cookie_string, password hashes), API tokens, and private issue data\n- With MySQL FILE privilege: full RCE via INTO OUTFILE writing a PHP webshell to the web root\n- The admin plants the payload once; any authenticated user viewing a bug with history triggers the injection\n\n### Patches\n- https://github.com/mantisbt/mantisbt/commit/6ad20bea2e01f33c6e4170775ae4d9dbe2c75325\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\n### Resources\n- https://mantisbt.org/bugs/view.php?id=37123\n\n### Credits\nMcCaulay Hudson (@McCaulay) of watchTowr",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "mantisbt/mantisbt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.28.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.28.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mantisbt/mantisbt/security/advisories/GHSA-mw6p-33vw-46cc"
}, {
"type" : "WEB",
"url" : "https://github.com/mantisbt/mantisbt/commit/6ad20bea2e01f33c6e4170775ae4d9dbe2c75325"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mantisbt/mantisbt"
}, {
"type" : "WEB",
"url" : "https://mantisbt.org/bugs/view.php?id=37123"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-15T16:38:22Z",
"nvd_published_at" : null
}
}