CVE-2025-47776: Mantisbt/mantisbt Authentication Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-4v8w-gg5j-ph37
CVSS 9.1
CWE-305 CWE-697
Published
Advisory Summary

CVE-2025-47776 is a HIGH (CVSS 9.1) authentication bypass vulnerability (CWE-305: Authentication Bypass by Primary Weakness) affecting Mantisbt/mantisbt libraries in the Packagist ecosystem. The issue involves mantisbt vulnerable to authentication bypass for some passwords due to php type juggling. Remediation is available by upgrading affected packages to version 2.27.2.

CVE-2025-47776 at a Glance

CVE Identifier CVE-2025-47776
GHSA Identifier GHSA-4v8w-gg5j-ph37
Severity HIGH
CVSS v3.1 Base Score 9.1
CWE Classification CWE-305: Authentication Bypass by Primary Weakness
Affected Product Mantisbt/mantisbt
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2025-47776

To remediate this vulnerability, upgrade all affected Mantisbt/mantisbt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mantisbt/mantisbt fixed: 2.27.2
Upgrade mantisbt/mantisbt to 2.27.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for mantisbt/mantisbt

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-47776, inspect your project dependencies for Mantisbt/mantisbt:

inspect dependencies for mantisbt/mantisbt

Analyze the terminal output to locate any version of Mantisbt/mantisbt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.27.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-305: Authentication Bypass by Primary Weakness, where the authentication algorithm is sound, but the implemented mechanism can be bypassed as the result of a separate weakness that is primary to the authentication error. In Mantisbt/mantisbt, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Due to an incorrect use of loose (`==`) instead of strict (`===`) comparison in the [authentication code][1], PHP type juggling will cause interpretation of certain MD5 hashes as numbers, specifically those matching scientific notation. [1]: https://github.com/mantisbt/mantisbt/blob/0fb502dd613991e892ed2224ac5ea3e40ba632bc/core/authentication_api.php#L782 ### Impact On MantisBT instances configured to use the *MD5* login method, user accounts having a password hash evaluating to zero (i.e. matching regex `^0+[Ee][0-9]+$`) are vulnerable, allowing an attacker knowing the victim's username to login without knowledge of their actual password, using any other password having a hash evaluating to zero, for example `comito5` (0e579603064547166083907005281618). No password bruteforcing for individual users is needed, thus $g_max_failed_login_count does not protect against the attack. ### Patches * https://github.com/mantisbt/mantisbt/commit/966554a19cf1bdbcfbfb3004766979faa748f9a2 ### Workarounds Check the database for vulnerable accounts, and change those users' passwords, e.g. for MySQL: ```sql SELECT username, email FROM mantis_user_table WHERE password REGEXP '^0+[Ee][0-9]+$' ``` ### References - https://mantisbt.org/bugs/view.php?id=35967 ### Credits Thanks to Harry Sintonen / Reversec for discovering and reporting the issue.

CVE-2025-47776 Affected Mantisbt/mantisbt Versions

1 component(s)
Fixed Versions:
2.27.2
Product / Package Ecosystem Affected Versions Fixed Version
mantisbt/mantisbt
Packagist
< 2.27.2
2.27.2

References

Frequently Asked Questions

What is CVE-2025-47776?
CVE-2025-47776 is a security vulnerability in Mantisbt/mantisbt involving MantisBT vulnerable to authentication bypass for some passwords due to PHP type juggling under CWE-305: Authentication Bypass by Primary Weakness.
Which Mantisbt/mantisbt versions are affected?
Affected versions include releases prior to 2.27.2 across affected packages: mantisbt/mantisbt.
What version fixes CVE-2025-47776?
Upgrading to 2.27.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mantisbt/mantisbt affected?
Yes, mantisbt/mantisbt is affected in releases prior to 2.27.2. Upgrade your dependency to 2.27.2 or later.
What is the CVSS score of CVE-2025-47776?
CVE-2025-47776 has a CVSS v3.1 base score of 9.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2025-47776?
CVE-2025-47776 is classified under CWE-305: Authentication Bypass by Primary Weakness (The authentication algorithm is sound, but the implemented mechanism can be bypassed as the result of a separate weakness that is primary to the authentication error.).
How can I check Packagist dependencies for CVE-2025-47776?
Run the dependency tree command: 'inspect dependencies for mantisbt/mantisbt'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4v8w-gg5j-ph37",
  "modified" : "2026-03-06T00:14:39Z",
  "published" : "2025-11-03T17:07:36Z",
  "aliases" : [ "CVE-2025-47776" ],
  "summary" : "MantisBT vulnerable to authentication bypass for some passwords due to PHP type juggling",
  "details" : "Due to an incorrect use of loose (`==`) instead of strict (`===`) comparison in the [authentication code][1], PHP type juggling will cause interpretation of certain MD5 hashes as numbers, specifically those matching scientific notation.\n\n[1]: https://github.com/mantisbt/mantisbt/blob/0fb502dd613991e892ed2224ac5ea3e40ba632bc/core/authentication_api.php#L782\n\n### Impact\nOn MantisBT instances configured to use the *MD5* login method, user accounts having a password hash evaluating to zero (i.e. matching regex `^0+[Ee][0-9]+$`) are vulnerable, allowing an attacker knowing the victim's username to login without knowledge of their actual password, using any other password having a  hash evaluating to zero, for example `comito5` (0e579603064547166083907005281618). \n\nNo password bruteforcing for individual users is needed, thus $g_max_failed_login_count does not protect against the attack.\n\n### Patches\n* https://github.com/mantisbt/mantisbt/commit/966554a19cf1bdbcfbfb3004766979faa748f9a2\n\n### Workarounds\nCheck the database for vulnerable accounts, and change those users' passwords, e.g. for MySQL:\n```sql\nSELECT username, email FROM mantis_user_table WHERE password REGEXP '^0+[Ee][0-9]+$'\n```\n\n### References\n- https://mantisbt.org/bugs/view.php?id=35967\n\n### Credits\nThanks to Harry Sintonen / Reversec for discovering and reporting the issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "mantisbt/mantisbt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.27.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mantisbt/mantisbt/security/advisories/GHSA-4v8w-gg5j-ph37"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-47776"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mantisbt/mantisbt/commit/966554a19cf1bdbcfbfb3004766979faa748f9a2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mantisbt/mantisbt"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mantisbt/mantisbt/blob/0fb502dd613991e892ed2224ac5ea3e40ba632bc/core/authentication_api.php#L782"
  }, {
    "type" : "WEB",
    "url" : "https://mantisbt.org/bugs/view.php?id=35967"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-305", "CWE-697" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-11-03T17:07:36Z",
    "nvd_published_at" : "2025-11-04T21:15:37Z"
  }
}