{"id":"CVE-2026-40597","published":"2026-05-22T19:29:46Z","modified":"2026-05-26T19:06:00Z","title":"MantisBT has a Content Security Policy bypass via attachments","vendor":"mantisbt","product":"mantisbt","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.6,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00498,"percentile":0.42555,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-358","name":"Improperly Implemented Security Check for Standard"}],"references":[{"url":"https://github.com/mantisbt/mantisbt/security/advisories/GHSA-9c3j-xm6v-j7j3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/mantisbt/mantisbt/commit/9e3bee2e7b909f4e3596985892b8bc8bee9e0bfe","tags":["x_refsource_MISC"]},{"url":"https://mantisbt.org/bugs/view.php?id=37016","tags":["x_refsource_MISC"]}],"priority":{"score":13.8,"factors":[{"name":"EPSS percentile","points":8.51},{"name":"CVSS severity","points":5.32}]},"vendorSlug":"mantisbt","affectedVersions":[{"vendor":"mantisbt","product":"mantisbt","versions":["< 2.28.2"]}],"affected":[{"ecosystem":"Packagist","package":"mantisbt/mantisbt","vulnerableRanges":["<2.28.2"],"patched":["2.28.2"],"from":["GHSA-9c3j-xm6v-j7j3"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-31496","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-mantisbt-cve-2026-40596","parents":[{"from":"CVE-2026-40596","to":"CVE-2026-40597","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-9c3j-xm6v-j7j3","via":"related"},{"kind":"osv-related","provenance":"source","id":"GHSA-j3v9-553h-x28j","via":"reference","url":"https://github.com/mantisbt/mantisbt/security/advisories/GHSA-9c3j-xm6v-j7j3"}]}],"children":[{"from":"CVE-2026-40597","to":"CVE-2026-44657","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-9c3j-xm6v-j7j3","via":"related"},{"kind":"osv-related","provenance":"source","id":"GHSA-p6fr-rxq7-xcg8","via":"reference","url":"https://github.com/mantisbt/mantisbt/security/advisories/GHSA-9c3j-xm6v-j7j3"}]}]}}