MantisBT 2.28.x XSS / CSP Bypass via file_download MIME
CVE-2026-40597 Published on May 22, 2026

MantisBT has a Content Security Policy bypass via attachments
Mantis Bug Tracker (MantisBT) is an open source issue tracker. In versions 2.28.1 and below, given any pre-existing XSS / HTML injection vulnerability, an attacker can bypass the Content Security Policy's script-src directive by uploading a crafted attachment to any issue that, when accessed via the file_download.php link, will be downloaded with a valid JavaScript MIME type resulting in script execution. The uploaded payload must be sniffed as a valid JavaScript MIME type by PHP finfo (see file_create_finfo() API function). Non-JavaScript MIME types will not get imported in a <script> tag by the browser, due to response header X-Content-Type-Options being set to nosniff, which requires all imported JavaScript files to be a valid JavaScript MIME type. This issue has been fixed in version 2.28.2.

NVD

Weakness Types

What is a XSS Vulnerability?

The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

CVE-2026-40597 has been classified to as a XSS vulnerability or weakness.

Improperly Implemented Security Check for Standard

The software does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.


Products Associated with CVE-2026-40597

Want to know whenever a new CVE is published for MantisBT? stack.watch will email you.

 

Affected Versions

mantisbt Version < 2.28.2 is affected by CVE-2026-40597

Exploit Probability

EPSS
0.07%
Percentile
21.82%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.