Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. mantisbt/mantisbt
  4. ›
  5. CVE-2026-40597

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

May 11, 2026 (updated June 8, 2026)

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.

References

  • github.com/advisories/GHSA-9c3j-xm6v-j7j3
  • github.com/mantisbt/mantisbt/commit/9e3bee2e7b909f4e3596985892b8bc8bee9e0bfe
  • github.com/mantisbt/mantisbt/security/advisories/GHSA-9c3j-xm6v-j7j3
  • mantisbt.org/bugs/view.php?id=37016
  • nvd.nist.gov/vuln/detail/CVE-2026-40597

Code Behaviors & Features

Detect and mitigate CVE-2026-40597 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.28.2

Fixed versions

  • 2.28.2

Solution

Upgrade to version 2.28.2 or above.

Impact 8.3 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-358: Improperly Implemented Security Check for Standard
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

packagist/mantisbt/mantisbt/CVE-2026-40597.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 15 Jun 2026 00:18:27 +0000.