CVE-2026-49273 — mantisbt
Fix: mantisbt/mantisbt@78c0af6CVE-2026-49273 is a remote code execution vulnerability in mantisbt/mantisbt. A fix is available for mantisbt/mantisbt — see the affected versions and patch details below.
MantisBT: Remote Code Execution via eval() Class Hoisting in adm_config_set.php
Real-World Exposure
mantisbt/mantisbtReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
MantisBT 2.28.3 and earlier contains a remote code execution vulnerability in the admin "Manage Configuration" feature (adm_config_set.php). When setting a configuration value with a non-string type (integer, float, complex), the value is passed through ConfigParser -> Tokenizer, which calls eval() with a return; prefix intended to prevent code execution.
However, PHP hoists function and class declarations at compile time, even past a return statement. An attacker can define a class in the eval()'d code that hijacks a class loaded later via PHP's autoloader, achieving arbitrary code execution.
This vulnerability requires administrator access to the web UI (adm_config_set.php). The REST API's ConfigsSetCommand does NOT use Tokenizer/eval() and is not affected.
Impact
- Remote code execution as the web server user (www-data) from an authenticated administrator session
Patches
Workarounds
None.
Resources
Credits
McCaulay Hudson (@_McCaulay) of watchTowr
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | mantisbt/mantisbt | ≥ 1.3.0&&< 2.28.4 | 2.28.4composer require mantisbt/mantisbt:^2.28.4 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for mantisbt/mantisbt, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update mantisbt/mantisbt to 2.28.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-49273 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2026-49273 in your dependencies?
Find it across Packagist, including transitive dependencies.