View Issue Details

IDProjectCategoryView StatusLast Update
0037350mantisbtsecuritypublic2026-11-22 16:11
Reportermtholmquist Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version2.28.4 
Summary0037350: 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):

$t_user_owns_the_bugnote = bugnote_is_user_reporter( $t_issue_note_id, $t_user_id );
$t_user_can_update_own_bugnote = config_get( 'bugnote_user_edit_threshold', null, $t_user_id, $t_project_id ); // returns e.g. 55
if( $t_user_owns_the_bugnote && !$t_user_can_update_own_bugnote ) {   // !55 === false -> branch never taken
    return mci_fault_access_denied( $t_user_id );
}

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):

$t_edit_threshold = $t_user_owns_note ? $t_bugnote_user_edit_threshold : $t_update_bugnote_threshold;
if( !access_has_bugnote_level( $t_edit_threshold, $t_bugnote_id, $t_user_id ) ) {   // compares level vs threshold
    return mci_fault_access_denied( $t_user_id );
}

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)):

  1. Create a REPORTER user (access level 25) and add them to a project.
  2. As an admin, create an issue; as the REPORTER, add a bugnote via SOAP mc_issue_note_add.
  3. As the REPORTER, call SOAP mc_issue_note_update() on that note with new text. Policy says only DEVELOPER+ may edit own notes, so this should be denied.
  4. Observed: the update succeeds and the note text is changed. The same call also changes the note's view_state with no threshold check.
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).

TagsNo tags attached.

Relationships

duplicate of 0037201 closeddregad Authorization bypass in mc_issue_note_update due to boolean coercion of Integer threshold 
related to 0037089 closeddregad CVE-2026-42070: REST/SOAP mc_issue_update Embedded Note Update Bypasses Note-Level Authorization 

Activities

dregad

dregad

2026-08-20 04:59

developer   ~0071346

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.

mtholmquist

mtholmquist

2026-08-20 06:53

reporter   ~0071347

Thanks, @dregad, credit is much appreciated. My GitHub ID is mtholmquist.

atrol

atrol

2026-08-20 12:17

developer   ~0071348

@dregad looks like a duplicate of 0037201

dregad

dregad

2026-08-21 03:37

developer   ~0071350

looks like a duplicate of 0037201

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.

dregad

dregad

2026-08-21 03:39

developer   ~0071351

ran a quick search yesterday but did not find it

Just realized that I had assigned to myself in my search criteria :-/