MantisBT CVE-2026-40598
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify MantisBT instance behind caching proxy
-
DeliverySend request to tag_update_page.php with crafted Referer header
-
ExploitUnescaped Referer echoed into HTML response
-
ExecutionProxy caches poisoned response
-
PersistVictim requests same page, receives cached payload
-
ImpactXSS payload executes in victim browser
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a MantisBT instance running version 2.28.1 or earlier. For the primary cache-poisoning XSS path, a caching proxy (CDN, reverse proxy such as Varnish or nginx with proxy_cache) must be positioned in front of the application and must include the Referer header in its cache key or otherwise store responses that echo back Referer content. Without a caching intermediary, direct reflected exploitation is substantially limited because modern browsers URL-encode special characters in automatically sent Referer headers, preventing them from breaking out of HTML attribute context. Exploitation is not automatable at scale per SSVC, and no authentication is required to send the crafted request. Environments where MantisBT is accessed directly without a caching layer face significantly reduced risk. |
| Impact | The vendor-assigned CVSS 4.0 score of 6.9 with AV:N/AC:L/AT:N/PR:N/UI:N reflects a liberal interpretation: the vector treats the flaw as broadly exploitable with no attack requirements. However, the CVE description explicitly qualifies that modern browsers URL-encode special characters, making direct reflected exploitation 'generally not directly actionable,' and restricts the viable attack path to 'specific server configurations' involving cache poisoning. SSVC corroborates this nuance: Automatable is rated 'no,' indicating the attack chain cannot be reliably replicated at scale, and Technical Impact is rated 'partial.' EPSS at 0.04% (14th percentile) aligns with a low real-world exploitation probability. The vulnerability is NOT listed in CISA KEV. The realistic risk level is lower than the raw CVSS 4.0 score implies: this is a meaningful security issue for MantisBT deployments sitting behind caching intermediaries, but not an imminent mass-exploitation threat. A CVSS 3.1 with AC:H and UI:R more accurately models the realistic attack conditions. |
| Exploit ScenarioDerived | An attacker targeting a MantisBT instance behind a caching proxy sends a crafted HTTP request to tag_update_page.php with a Referer header containing an HTML injection payload (e.g., a closing quote followed by an event handler attribute). If the proxy caches the response, subsequent legitimate users who receive the poisoned cache entry will have the injected script execute in their browser session, enabling session token theft or malicious redirection. A proof-of-concept has been referenced per SSVC, though reliable exploitation depends on the specific caching configuration of the target environment. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 23, 2026
Reflected HTML injection in MantisBT's tag update page (tag_update_page.php) arises from the application echoing the HTTP Referer header into an HTML hidden input without proper escaping. All versions through 2.28.1 are affected. In the most exploitable scenario, an attacker poisons a caching proxy by submitting a crafted Referer value, causing downstream users who receive the cached response to execute attacker-controlled JavaScript - a web-cache-deception-style XSS path. No public exploit identified at time of analysis, though SSVC classifies exploitation status as poc; EPSS is low at 0.04% (14th percentile).
RemediationAI
Upgrade MantisBT to version 2.28.2, which applies proper HTML escaping to the Referer-derived redirect value via string_html_specialchars() in tag_update_page.php (patch commit b1ebc57763f104eb5f541b7b4d1ce6948168abd9, advisory https://github.com/mantisbt/mantisbt/security/advisories/GHSA-6jh4-47v2-4g37). No official workaround is provided by the vendor. As a compensating control for environments that cannot immediately patch, stripping or nullifying the Referer header at the reverse proxy or WAF layer before it reaches MantisBT would eliminate the injection surface - note this may break legitimate redirect flows within the application. Disabling caching for responses from tag_update_page.php at any intermediary (CDN, Varnish, nginx proxy_cache) removes the cache-poisoning escalation path without disrupting functionality, and should be applied even after patching as defense in depth.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
MantisBT (composer/mantisbt/mantisbt, CPE pkg:composer/mantisbt_mantisbt) is an open-source PHP bug-tracking application. The flaw (CWE-79: Improper Neutralization of Input During Web Page Generation) exists in tag_update_page.php, where the variable $t_redirect_page - populated from the browser's Referer header - was previously written directly into an HTML attribute value: <input type='hidden' name='redirect' value='<?php echo $t_redirect_page ?>'/>. Without calling string_html_specialchars() to HTML-encode the value, any special characters included in the Referer bypass the attribute context boundary. The commit b1ebc57763f104eb5f541b7b4d1ce6948168abd9 applies the missing escaping function. Modern browsers generally URL-encode special characters in the Referer, narrowing the direct reflected-XSS surface; however, reverse proxies or CDN configurations that cache responses containing raw Referer values create a persistent XSS vector.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
AC:H reflects the need for a caching intermediary; UI:R required for victim to receive and trigger the poisoned cached response; S:C for browser context escape enabling XSS.
Primary rating from Vendor (https://github.com/mantisbt/mantisbt).
CVSS VectorVendor: https://github.com/mantisbt/mantisbt
Lifecycle Timeline
2DescriptionCVE.org
Improper escaping of the redirection page (retrieved from the request's *Referer* header) allows an attacker to inject HTML.
While this is generally not directly actionable as modern browsers will URL-encode special characters, on some specific server configurations this could poison the cache, leading to cross-site scripting.
Impact
Cross-site scripting (XSS).
Patches
- b1ebc57763f104eb5f541b7b4d1ce6948168abd9
Workarounds
None
Credits
Thanks to siunam (Tang Cheuk Hei) for discovering and responsibly reporting the issue.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
GHSA-6jh4-47v2-4g37
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB