# CVE-2026-40597: MantisBT has a Content Security Policy bypass via attachments

- Severity: High 7.6 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.50%, higher than 44% of CVEs (2026-12-01)
- Published: 2026-05-11T19:34:48.000Z
- Modified: 2026-09-10T03:51:05.076Z
- Also known as: GHSA-9c3j-xm6v-j7j3
- Related: CVE-2026-40596, CVE-2026-44657
- Weaknesses: CWE-79, CWE-358
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- mantisbt mantisbt: < 2.28.2
- mantisbt/mantisbt (Packagist): before 2.28.2

## Every score

- GitHub_M: CVSS:4.0 7.6 High `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`
- GitHub: CVSS:4.0 High `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`

## References

- <https://github.com/mantisbt/mantisbt/security/advisories/GHSA-9c3j-xm6v-j7j3> (web)
- <https://github.com/mantisbt/mantisbt/commit/9e3bee2e7b909f4e3596985892b8bc8bee9e0bfe> (web)
- <https://mantisbt.org/bugs/view.php?id=37016> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40597> (advisory)
- <https://github.com/mantisbt/mantisbt> (package)

## Sources

- CVE List: [CVE-2026-40597](https://www.cve.org/CVERecord?id=CVE-2026-40597), CVE Terms of Use, modified 2026-05-26
- GitHub Advisory Database: [GHSA-9c3j-xm6v-j7j3](https://github.com/advisories/GHSA-9c3j-xm6v-j7j3), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-40597](https://nvd.nist.gov/vuln/detail/CVE-2026-40597), Public domain, modified 2026-07-23

---

Page: https://cve.day/CVE-2026-40597 · Whole record: https://cve.day/CVE-2026-40597.json · Rebuilt by cve.day 2026-11-25T22:59:22.205Z
