{"id":"CVE-2026-40597","state":"PUBLISHED","title":"MantisBT has a Content Security Policy bypass via attachments","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.","publishedAt":"2026-05-22T19:29:46.728Z","updatedAt":"2026-05-26T19:06:00.401Z","severity":{"score":7.6,"label":"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","source":"GitHub_M"},"assigner":"GitHub_M","products":["mantisbt mantisbt"],"affected":[{"vendor":"mantisbt","product":"mantisbt","versions":[{"version":"< 2.28.2","status":"affected"}]}],"references":["https://github.com/mantisbt/mantisbt/security/advisories/GHSA-9c3j-xm6v-j7j3","https://github.com/mantisbt/mantisbt/commit/9e3bee2e7b909f4e3596985892b8bc8bee9e0bfe","https://mantisbt.org/bugs/view.php?id=37016"],"weaknesses":["CWE-79","CWE-358"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/40xxx/CVE-2026-40597.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-40597","state":"PUBLISHED","datePublished":"2026-05-22T19:29:46.728Z","dateUpdated":"2026-05-26T19:06:00.401Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-04-14T14:07:59.641Z"},"containers":{"cna":{"title":"MantisBT has a Content Security Policy bypass via attachments","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"mantisbt","product":"mantisbt","versions":[{"version":"< 2.28.2","status":"affected"}]}],"references":[{"url":"https://github.com/mantisbt/mantisbt/security/advisories/GHSA-9c3j-xm6v-j7j3","name":"https://github.com/mantisbt/mantisbt/security/advisories/GHSA-9c3j-xm6v-j7j3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/mantisbt/mantisbt/commit/9e3bee2e7b909f4e3596985892b8bc8bee9e0bfe","name":"https://github.com/mantisbt/mantisbt/commit/9e3bee2e7b909f4e3596985892b8bc8bee9e0bfe","tags":["x_refsource_MISC"]},{"url":"https://mantisbt.org/bugs/view.php?id=37016","name":"https://mantisbt.org/bugs/view.php?id=37016","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"LOW","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"LOW","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":7.6,"baseSeverity":"HIGH","vectorString":"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"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","lang":"en","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-358","lang":"en","description":"CWE-358: Improperly Implemented Security Check for Standard","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-05-22T19:29:46.728Z"},"source":{"advisory":"GHSA-9c3j-xm6v-j7j3","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-05-26T19:05:54.812787Z","id":"CVE-2026-40597","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-05-26T19:06:00.401Z"}}]}}}