8.8high
MantisBT: Authentication bypass for some passwords due to PHP type juggling
- Severity
- 8.8high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.34% (higher than 30% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-4v8w-gg5j-ph37
Description
Mantis Bug Tracker (MantisBT) is an open source issue tracker. Due to incorrect use of loose (==) instead of strict (===) comparison in the authentication code in versions 2.27.1 and below.PHP type juggling will cause certain MD5 hashes matching scientific notation to be interpreted as numbers. Instances using the MD5 login method allow an attacker who knows the victim's username and has access to an account with a password hash that evaluates to zero to log in without knowing the victim's actual password, by using any other password with a hash that also evaluates to zero This issue is fixed in version 2.27.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| mantisbt mantisbt | < 2.27.2, before 2.27.2 | CVE List, NVD |
| mantisbt/mantisbt (Packagist) | before 2.27.2 | GitHub Advisory Database |
All scores
| GitHub_M | 8.8high CVSS:4.0 | 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 |
| GitHub | 9.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | high CVSS:4.0 | 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 |
| NVD | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
Classification
What each source says
CVE List
Mantis Bug Tracker (MantisBT) is an open source issue tracker. Due to incorrect use of loose (==) instead of strict (===) comparison in the authentication code in versions 2.27.1 and below.PHP type juggling will cause certain MD5 hashes matching scientific notation to be interpreted as numbers. Instances using the MD5 login method allow an attacker who knows the victim's username and has access to an account with a password hash that evaluates to zero to log in without knowing the victim's actual password, by using any other password with a hash that also evaluates to zero This issue is fixed in version 2.27.2.
GitHub Advisory Database
Due to an incorrect use of loose (==) instead of strict (===) comparison in the authentication code, PHP type juggling will cause interpretation of certain MD5 hashes as numbers, specifically those matching scientific notation.
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
Workarounds
Check the database for vulnerable accounts, and change those users' passwords, e.g. for MySQL:
SELECT username, email FROM mantis_user_table WHERE password REGEXP '^0+[Ee][0-9]+$'
References
Credits
Thanks to Harry Sintonen / Reversec for discovering and reporting the issue.
NVD (es)
Mantis Bug Tracker (MantisBT) es un rastreador de problemas de código abierto. Debido al uso incorrecto de la comparación laxa (==) en lugar de la estricta (===) en el código de autenticación en las versiones 2.27.1 e inferiores. La manipulación de tipos de PHP (PHP type juggling) hará que ciertos hashes MD5 que coinciden con la notación científica sean interpretados como números. Las instancias que utilizan el método de inicio de sesión MD5 permiten a un atacante que conoce el nombre de usuario de la víctima y tiene acceso a una cuenta con un hash de contraseña que se evalúa a cero iniciar sesión sin conocer la contraseña real de la víctima, utilizando cualquier otra contraseña con un hash que también se evalúe a cero. Este problema se corrige en la versión 2.27.2.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-47776 changed 2025-11-05 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4v8w-gg5j-ph37 changed 2026-03-06 | CC-BY-4.0 |
| NVD | CVE-2025-47776 changed 2026-10-19 | Public domain |