CVE-2024-39912
Enumeration of valid usernames in web-auth/webauthn-lib
web-auth/webauthn-lib is an open source set of PHP libraries and a Symfony bundle to allow developers to integrate that authentication mechanism into their web applications. The ProfileBasedRequestOptionsBuilder method returns allowedCredentials without any credentials if no username was found. When WebAuthn is used as the first or only authentication method, an attacker can enumerate usernames based on the absence of the allowedCredentials property in the assertion options response. This allows enumeration of valid or invalid usernames. By knowing which usernames are valid, attackers can focus their efforts on a smaller set of potential targets, increasing the efficiency and likelihood of successful attacks. This issue has been addressed in version 4.9.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.3
Enumeration of valid usernames in web-auth/webauthn-lib
web-auth/webauthn-lib is an open source set of PHP libraries and a Symfony bundle to allow developers to integrate that authentication mechanism into their web applications. The ProfileBasedRequestOptionsBuilder method returns allowedCredentials without any credentials if no username was found. When WebAuthn is used as the first or only authentication method, an attacker can enumerate usernames based on the absence of the allowedCredentials property in the assertion options response. This allows enumeration of valid or invalid usernames. By knowing which usernames are valid, attackers can focus their efforts on a smaller set of potential targets, increasing the efficiency and likelihood of successful attacks. This issue has been addressed in version 4.9.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
CVE-2024-39912- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-204
- Updated
- 2026-11-02
EUVDEUVD-2024-2291
5.3
web-auth/webauthn-lib is an open source set of PHP libraries and a Symfony bundle to allow developers to integrate that authentication mechanism into their web applications. The ProfileBasedRequestOptionsBuilder method returns allowedCredentials without any credentials if no username was found. When WebAuthn is used as the first or only authentication method, an attacker can enumerate usernames based on the absence of the allowedCredentials property in the assertion options response. This allows enumeration of valid or invalid usernames. By knowing which usernames are valid, attackers can focus their efforts on a smaller set of potential targets, increasing the efficiency and likelihood of successful attacks. This issue has been addressed in version 4.9.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
EUVD-2024-2291- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-875x-g8p7-5w27
6.9
The FIDO2/Webauthn Support for PHP library allows enumeration of valid usernames
Summary
The ProfileBasedRequestOptionsBuilder method returns allowedCredentials without any credentials if no username was found.
Details
When WebAuthn is used as the first or only authentication method, an attacker can enumerate usernames based on the absence of the allowedCredentials property in the assertion options response. This allows enumeration of valid or invalid usernames.
Proposal how to resolve it:
return $this->publicKeyCredentialRequestOptionsFactory->create(
$this->profile,
count($allowedCredentials) <= 0 ? self::getRandomCredentials(): $allowedCredentials,
$optionsRequest->userVerification,
$extensions
);
private static function getRandomCredentials(): array
{
$credentialSources = [];
for ($i = 0; $i <= rand(0,1); $i++) {
$credentialSources[] = new PublicKeyCredentialSource(
random_bytes(32),
"public-key",
[],
"basic",
new EmptyTrustPath(),
Uuid::v7(),
random_bytes(77),
Uuid::v7()->__toString(),
rand(0, 6000),
null
);
}
return array_map(
static fn (PublicKeyCredentialSource $credential): PublicKeyCredentialDescriptor => $credential->getPublicKeyCredentialDescriptor(),
$credentialSources
);
}
PoC
curl https://example.com/assertion/options
-H 'content-type: application/json'
--data-raw '{"username":"NotMeRandomUsername123"}'
Impact
By knowing which usernames are valid, attackers can focus their efforts on a smaller set of potential targets, increasing the efficiency and likelihood of successful attacks.
- Record
GHSA-875x-g8p7-5w27- CVSS 4.0
- 6.9 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-204
- Updated
- 2026-11-02
NVD
5.3
web-auth/webauthn-lib is an open source set of PHP libraries and a Symfony bundle to allow developers to integrate that authentication mechanism into their web applications. The ProfileBasedRequestOptionsBuilder method returns allowedCredentials without any credentials if no username was found. When WebAuthn is used as the first or only authentication method, an attacker can enumerate usernames based on the absence of the allowedCredentials property in the assertion options response. This allows enumeration of valid or invalid usernames. By knowing which usernames are valid, attackers can focus their efforts on a smaller set of potential targets, increasing the efficiency and likelihood of successful attacks. This issue has been addressed in version 4.9.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
CVE-2024-39912- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-204
- Updated
- 2026-11-02
OSV
5.3
Enumeration of valid usernames in web-auth/webauthn-lib
web-auth/webauthn-lib is an open source set of PHP libraries and a Symfony bundle to allow developers to integrate that authentication mechanism into their web applications. The ProfileBasedRequestOptionsBuilder method returns allowedCredentials without any credentials if no username was found. When WebAuthn is used as the first or only authentication method, an attacker can enumerate usernames based on the absence of the allowedCredentials property in the assertion options response. This allows enumeration of valid or invalid usernames. By knowing which usernames are valid, attackers can focus their efforts on a smaller set of potential targets, increasing the efficiency and likelihood of successful attacks. This issue has been addressed in version 4.9.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
CVE-2024-39912- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-204
- Updated
- 2026-11-02
OSVGHSA-875x-g8p7-5w27
6.9
The FIDO2/Webauthn Support for PHP library allows enumeration of valid usernames
Summary
The ProfileBasedRequestOptionsBuilder method returns allowedCredentials without any credentials if no username was found.
Details
When WebAuthn is used as the first or only authentication method, an attacker can enumerate usernames based on the absence of the allowedCredentials property in the assertion options response. This allows enumeration of valid or invalid usernames.
Proposal how to resolve it:
return $this->publicKeyCredentialRequestOptionsFactory->create(
$this->profile,
count($allowedCredentials) <= 0 ? self::getRandomCredentials(): $allowedCredentials,
$optionsRequest->userVerification,
$extensions
);
private static function getRandomCredentials(): array
{
$credentialSources = [];
for ($i = 0; $i <= rand(0,1); $i++) {
$credentialSources[] = new PublicKeyCredentialSource(
random_bytes(32),
"public-key",
[],
"basic",
new EmptyTrustPath(),
Uuid::v7(),
random_bytes(77),
Uuid::v7()->__toString(),
rand(0, 6000),
null
);
}
return array_map(
static fn (PublicKeyCredentialSource $credential): PublicKeyCredentialDescriptor => $credential->getPublicKeyCredentialDescriptor(),
$credentialSources
);
}
PoC
curl https://example.com/assertion/options
-H 'content-type: application/json'
--data-raw '{"username":"NotMeRandomUsername123"}'
Impact
By knowing which usernames are valid, attackers can focus their efforts on a smaller set of potential targets, increasing the efficiency and likelihood of successful attacks.
- Record
GHSA-875x-g8p7-5w27- CVSS 4.0
- 6.9 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-204
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
web-auth/webauthn-libPackagist |
4.5.0 up to 4.9.0 | 4.9.0 |
web-auth/webauthn-frameworkPackagist |
4.5.0 up to 4.9.0 | 4.9.0 |
web-auth/webauthn-libPackagist |
4.5.0 up to 4.9.0, plus listed versions 4.5.14.5.24.6.04.6.14.6.2 Show 20 moreShow less4.6.34.6.44.7.04.7.14.7.24.7.34.7.44.7.54.7.64.7.74.7.84.7.94.8.04.8.14.8.24.8.34.8.44.8.54.8.64.8.7 |
4.9.0 |
web-auth/webauthn-frameworkPackagist |
4.5.0 up to 4.9.0, plus listed versions 4.5.14.5.24.6.04.6.14.6.2 Show 20 moreShow less4.6.34.6.44.7.04.7.14.7.24.7.34.7.44.7.54.7.64.7.74.7.84.7.94.8.04.8.14.8.24.8.34.8.44.8.54.8.64.8.7 |
4.9.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-39912 is a medium vulnerability (CVSS 5.3) in Spomky-labs Webauthn Framwork, published July 15, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.39%, the 33rd percentile. Fixed in web-auth/webauthn-lib 4.9.0.
References
github.com/web-auth/webauthn-framework/security/advisories/GHSA-875x-g8p7-5w27
github.com/web-auth/webauthn-framework/commit/64de11f6cddc71e56c76e0cc4573bf94d02be045
github.com/web-auth/webauthn-framework/commit/a9d1352897fba552e659e1445a771dec2d4ed05a
github.com/web-auth/webauthn-lib/commit/b6798de27cdedd8681fe4c9b13ace0ff2456d18b
nvd.nist.gov/vuln/detail/CVE-2024-39912
github.com/advisories/GHSA-875x-g8p7-5w27
github.com/CVEProject/cvelistV5/tree/main/cves/2024/39xxx/CVE-2024-39912.json
github.com/web-auth/webauthn-framework