View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0037350 | mantisbt | security | public | 2026-08-19 13:05 | 2026-11-22 16:11 |
| Reporter | mtholmquist | Assigned To | dregad | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | duplicate | ||
| Product Version | 2.28.4 | ||||
| Summary | 0037350: MantisBT SOAP mc_issue_note_update() own-note edit-threshold check is fail-open (boolean coercion) | ||||
| Description | In the MantisBT SOAP API, mc_issue_note_update() guards a note owner's ability to edit their own bugnote with a check that can never fire. It negates a configuration integer with PHP's ! operator - !config_get('bugnote_user_edit_threshold') - and !55 is false for any non-zero threshold. So the access-denied branch is dead: a low-privileged REPORTER (access level 25) can edit the text, and toggle the view state (public/private), of any bugnote they authored, regardless of the configured bugnote_user_edit_threshold (default DEVELOPER = 55). This is the direct sibling of CVE-2026-42070 (GHSA-pq86-j2c2-47f6), whose fix corrected mc_issue_update() but left mc_issue_note_update() with this broken check. Root cause - api/soap/mc_issue_api.php, mc_issue_note_update() (release-2.28.4, lines 1541-1543):
config_get('bugnote_user_edit_threshold') returns the threshold value (55 for DEVELOPER), not a boolean. !55 is false, so for any note owner the denial is skipped and the edit proceeds. The correct pattern already exists in the same file, in the CVE-2026-42070-patched mc_issue_update() (lines 1218-1219):
access_has_bugnote_level() compares the user's numeric access level against the threshold. The web UI (bugnote_edit_page.php, bugnote_update.php) uses this correct pattern via access_ensure_bugnote_level(). Only the SOAP mc_issue_note_update() owner branch was left with the !integer coercion. Secondary: lines 1559-1562 let mc_issue_note_update() change a bugnote's view_state with no check against set_view_status_threshold, so a REPORTER can mark their own note private or public even where policy restricts that. Affected: confirmed on release-2.28.4 (current latest stable) and master. The flawed check was introduced by commit 9b6ee5c57c (2012-06-05), which changed the config key from the then-nonexistent bugnote_allow_user_edit_delete (returned null, so !null = true and the denial could fire) to the real key bugnote_user_edit_threshold (returns integer 55, so !55 = false and the denial never fires). Patched: none - CVE-2026-42070 (fixed in 2.28.2) patched only the sibling mc_issue_update(). Impact is bounded to the attacker's own bugnotes: editing note text after posting when policy should forbid it, and flipping a note's view state without the set_view_status_threshold check. There is no cross-user note access - the not-owner branch at line 1550 uses the correct access_has_bugnote_level() and is unaffected. Suggested fix: replace the fail-open check in mc_issue_note_update() with the same access_has_bugnote_level() comparison already used by mc_issue_update() (lines 1218-1219), and gate the view_state change on set_view_status_threshold. | ||||
| Steps To Reproduce | On MantisBT 2.28.4, default config (webservice_readwrite_access_level_threshold = REPORTER (25), bugnote_user_edit_threshold inherits DEVELOPER (55)):
| ||||
| Additional Information | CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N = 4.3 (Medium). Anchored to the parent CVE-2026-42070 (NVD CVSS 4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L = 5.3); this finding is narrower (own-note only, no availability impact). Weakness: CWE-863 (Incorrect Authorization) - the check exists but coerces a threshold integer to boolean instead of comparing access level, so it always passes (fails open). | ||||
| Tags | No tags attached. | ||||
|
Thanks for the report @mtholmquist, seems indeed like the fix for 0037089 was incomplete. I'll have a closer look later. In the meanwhile, please indicate if you would you like to be credited for the finding, and if so how; kindly provide your GitHub id as well. |
|
|
Thanks, @dregad, credit is much appreciated. My GitHub ID is mtholmquist. |
|
Indeed it is, thanks for the pointer. The issue did seem familiar and I ran a quick search yesterday but did not find it. @mtholmquist I'll close this one as duplicate, you'll be co-credited for the finding. |
|
Just realized that I had assigned to myself in my search criteria :-/ |
|