{"id":"CVE-2026-40597","aliases":["GHSA-9c3j-xm6v-j7j3"],"url":"https://o3.security/vulnerability/CVE-2026-40597","summary":"MantisBT has a Content Security Policy bypass via attachments","details":"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.","published":"2026-05-22T19:29:46.728Z","modified":"2026-08-07T11:49:53.313839009Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"mantisbt/mantisbt","fixedVersion":"2.28.2"}],"fix":{"url":"https://github.com/mantisbt/mantisbt/commit/9e3bee2e7b909f4e3596985892b8bc8bee9e0bfe","label":"mantisbt/mantisbt@9e3bee2"},"references":[{"type":"WEB","url":"https://mantisbt.org/bugs/view.php?id=37016"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40597.json"},{"type":"ADVISORY","url":"https://github.com/mantisbt/mantisbt/security/advisories/GHSA-9c3j-xm6v-j7j3"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40597"},{"type":"FIX","url":"https://github.com/mantisbt/mantisbt/commit/9e3bee2e7b909f4e3596985892b8bc8bee9e0bfe"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-07T11:49:53.313839009Z"}}