{"answers":{"affected":"2 open source packages ship an affected version, including mantisbt/mantisbt.","exploited":"There is no known exploitation of CVE-2026-40597 in the wild and no public exploit code.","fix":"Upgrade mantisbt/mantisbt to 2.28.2 or later.","what":"CVE-2026-40597 is a high-severity vulnerability in mantisbt, published on 22 May 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-40597 and fix it if it is affected.\n\nWhat it is: CVE-2026-40597 is a high-severity vulnerability in mantisbt, published on 22 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-40597 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- mantisbt/mantisbt (Packagist): affected all versions; fixed in 2.28.2\n- mantisbt/mantisbt (Packagist): affected all versions; fixed in 2.28.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40597/ (Markdown: https://insights.sbomify.com/CVE-2026-40597/index.md)","id":"CVE-2026-40597","markdown":"https://insights.sbomify.com/CVE-2026-40597/index.md","name":"CVE-2026-40597","record":{"aliases":["GHSA-9c3j-xm6v-j7j3"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"MantisBT issue tracker","requires_auth":"low_privilege","summary":"Attackers can bypass Content Security Policy restrictions by uploading crafted attachments with valid JavaScript MIME types, enabling script execution.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":7.6,"severity":"high","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-358","name":"Improperly Implemented Security Check for Standard"}],"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 \u003cscript\u003e 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.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"MantisBT has a Content Security Policy bypass via attachments","id":"CVE-2026-40597","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"security_feature_bypass","year":"2026"},"n_packages":2,"n_references":3,"next":{"headline":"MantisBT has Potential Referer-Based Reflected HTML Injection / XSS in Tag Update Page","id":"CVE-2026-40598"},"packages":[{"ecosystem":"Packagist","fixed":["2.28.2"],"introduced":["0"],"last_affected":[],"package":"mantisbt/mantisbt","purl":null,"source":"GHSA-9c3j-xm6v-j7j3"},{"ecosystem":"Packagist","fixed":["2.28.2"],"introduced":["0"],"last_affected":[],"package":"mantisbt/mantisbt","purl":"pkg:composer/mantisbt/mantisbt","source":"GHSA-9c3j-xm6v-j7j3"}],"prev":{"headline":"MantisBT is vulnerable to XSS and potential account takeover via user font family preference update","id":"CVE-2026-40596"},"products":["mantisbt"],"published":"2026-05-22","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-05-26","vendors":["mantisbt"]},"summary":"Attackers can bypass Content Security Policy restrictions by uploading crafted attachments with valid JavaScript MIME types, enabling script execution.","url":"https://insights.sbomify.com/CVE-2026-40597/"}