View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0036985 | mantisbt | security | public | 2026-03-17 18:21 | 2026-05-09 19:56 |
| Reporter | ninjasec | Assigned To | dregad | ||
| Priority | high | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 2.28.1 | ||||
| Target Version | 2.28.2 | Fixed in Version | 2.28.2 | ||
| Summary | 0036985: CVE-2026-42071: REST Issue File Listing Leaks Attachments From Hidden Private Bugnotes | ||||
| Description | MantisBT exposes attachments linked to private bugnotes through the REST issue-file listing endpoint. When a user can view an issue but cannot view a private bugnote on that issue, GET /api/rest/issues/{id}/files still returns attachments associated with the hidden note, including base64 file content. The normal file download path continues to enforce access control and returns 403 Forbidden, so the disclosure is specific to the listing/content API path. The root cause is that file_api.php:296 checks bugnote attachment visibility against the parent issue instead of the bugnote itself: As a result, private-bugnote restrictions are skipped during attachment enumeration. IssueFileGetCommand.php:57 then reads and returns the attachment content for each enumerated file. Affected Code
| ||||
| Steps To Reproduce |
| ||||
| Additional Information | Impact A user who cannot view a private bugnote can still enumerate and retrieve attachments from that note through REST, including full file content. This is a confidentiality issue affecting private note attachments on otherwise visible issues. | ||||
| Tags | No tags attached. | ||||
| related to | 0027039 | closed | dregad | CVE-2020-25781: Access to private bug note attachments |
| has duplicate | 0037092 | closed | dregad | Private Bugnote Attachment Content Leak via REST API |
| has duplicate | 0037095 | closed | dregad | Private Bugnote Files Disclosure via REST API Get Issues Files Or SOAP API mc_issue_attachment_get |
|
Advisory https://github.com/mantisbt/mantisbt/security/advisories/GHSA-pw5x-2mf9-3xc8, CVE request sent. |
|
|
CVE-2026-42071 assigned |
|
|
@ninjasec Patch is ready for review, https://github.com/mantisbt/mantisbt-private/pull/5. looking forward to receiving your feedback. While testing, I realized that the SOAP API was vulnerable as well, but from a different code path. Fix is included in the PR. |
|
|
MantisBT: master-2.28 77d25d37 2026-05-02 06:25 Details Diff |
Add $p_bug_id parameter file_can_download_bugnote_attachments() function's callers usually already know the bug id. This avoids an unnecessary bugnote_get_field() call. Issue 0036985 |
Affected Issues 0036985 |
|
| mod - core/file_api.php | Diff File | ||
| mod - file_download.php | Diff File | ||
|
MantisBT: master-2.28 5b7f5bc9 2026-05-02 06:29 Details Diff |
Fix Private Bugnote Attachment Leak via REST API Add missing $p_bugnote_id argument to file_can_view_or_download() call in file_can_view_bugnote_attachments. This fixes the incorrect access check that was giving undue access to private attachments. Fixes 0036985, GHSA-pw5x-2mf9-3xc8 / CVE-2026-42071 |
Affected Issues 0036985 |
|
| mod - core/file_api.php | Diff File | ||
|
MantisBT: master-2.28 955cb50f 2026-05-02 07:01 Details Diff |
Fix Private Bugnote Attachment Leak via SOAP API Incomplete access checks in mci_file_can_download_bug_attachments() resulted in unauthorized access to attachments. The function has been removed and replaced by calls to standard file API functions file_can_download_bug_attachments() and file_can_download_bugnote_attachments(). Fixes 0036985, GHSA-pw5x-2mf9-3xc8 / CVE-2026-42071 |
Affected Issues 0036985 |
|
| mod - api/soap/mc_file_api.php | Diff File | ||