View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0037003 | mantisbt | security | public | 2026-04-02 13:26 | 2026-05-09 19:56 |
| Reporter | morimori-dev | Assigned To | dregad | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Target Version | 2.28.2 | Fixed in Version | 2.28.2 | ||
| Summary | 0037003: CVE-2026-39960: Stored XSS in Custom Field Textarea Values | ||||
| Description | The fix for CVE-2024-34081 addressed XSS in Custom Field names, but Custom Field textarea values remain unescaped in cfdef_input_textarea(). In core/cfdefs/cfdef_standard.php line 498, the textarea value is output without HTML escaping:
Compare with the text field function (line 480) which correctly uses string_attribute():
An authenticated user with bug report permission can inject arbitrary JavaScript via a textarea-type custom field value. When any user (including an administrator) opens the bug edit form, the XSS executes. CVSS 5.4 Medium (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N) | ||||
| Steps To Reproduce |
The payload breaks out of the | ||||
| Additional Information | Proposed Fix: In core/cfdefs/cfdef_standard.php, line 498, replace:
with:
This applies the same escaping pattern used elsewhere in the codebase (e.g., string_attribute() for text inputs). Impact:
Reporter: Nozomu Sasaki (Paul) | ||||
| Tags | No tags attached. | ||||
|
Thanks for the detailed report report @morimori-dev. I will have a closer look later on. |
|
|
Vulnerability confirmed, and verified that the proposed patch does resolve the issue. I opened Security Advisory https://github.com/mantisbt/mantisbt/security/advisories/GHSA-qj6w-v29q-4rgx and requested a CVE. |
|
|
CVE-2026-39960 assigned |
|
|
MantisBT: master-2.28 5fec0f44 2026-04-08 04:49 Details Diff |
Escape textarea custom field for display Prevents HTML injection / XSS in bug_update_page.php. Fixes 0037003, GHSA-qj6w-v29q-4rgx Co-authored-by: Nozomu Sasaki <nzm117ssk@gmail.com> |
Affected Issues 0037003 |
|
| mod - core/cfdefs/cfdef_standard.php | Diff File | ||