CVE-2026-130747: Grav before 1.7.53.7 and 2.x before 2.2.18 Authentication Bypass via First-Run Setup
Grav before 1.7.53.7 and 2.x before 2.2.18 contains an authentication bypass vulnerability that allows anonymous visitors to create super-admin accounts because UserCollection::count() uses an unescaped glob() pattern. On installs whose path contains brackets or a backslash, the account count returns zero, so attackers can send requests to POST /api/v1/auth/setup or the classic admin registration form to create or overwrite administrator accounts.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.7.53.7 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.2.18
Event History
Frequently Asked Questions
Which installations are exposed to unauthenticated account creation?
Affected Grav installations are exposed when their installation path contains brackets or a backslash. Under that condition, the user count can incorrectly return zero and make first-run setup appear available to anonymous visitors.
What does an attacker need to exploit this issue?
An attacker does not need credentials or user interaction. They need network access to the affected instance and can target POST /api/v1/auth/setup or the classic admin registration form.
What level of access can an attacker obtain?
An attacker can create or overwrite administrator accounts, including super-admin accounts. This can result in full compromise of confidentiality, integrity, and availability.
How can I determine whether my instance may already be affected?
Check whether the Grav installation path contains brackets or a backslash, and review administrator accounts for unexpected creation or modification. Also review requests to POST /api/v1/auth/setup and use of the classic admin registration form.