CVE-2026-30964
JSON

5.4medium

Webauthn Framework: allowed_origins collapses URL-like origins to host-only values, bypassing exact origin validation

Severity
5.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.23% (higher than 8% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-f7pm-6hr8-7ggm

Description

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. Prior to 5.2.4, when allowed_origins is configured, CheckAllowedOrigins reduces URL-like values to their host component and accepts on host match alone. This makes exact origin policies impossible to express: scheme and port differences are silently ignored. This vulnerability is fixed in 5.2.4.

Affected

Product or packageVersionsReported by
web-auth webauthn-framework< 5.2.4CVE List
web-auth webauthn-lib< 5.2.4CVE List
web-auth webauthn-symfony-bundle< 5.2.4CVE List
web-auth/webauthn-framework (Packagist)from 5.2.0 before 5.2.4GitHub Advisory Database
web-auth/webauthn-lib (Packagist)from 5.2.0 before 5.2.4GitHub Advisory Database
web-auth/webauthn-symfony-bundle (Packagist)from 5.2.0 before 5.2.4GitHub Advisory Database
spomky-labs webauthn-libfrom 5.2.0 before 5.2.4NVD
spomky-labs webauthn-symfony-bundlefrom 5.2.0 before 5.2.4NVD
spomky-labs webauthn_framworkfrom 5.2.0 before 5.2.4NVD

All scores

GitHub_M5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
GitHub5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Classification

CWE-346

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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. Prior to 5.2.4, when allowed_origins is configured, CheckAllowedOrigins reduces URL-like values to their host component and accepts on host match alone. This makes exact origin policies impossible to express: scheme and port differences are silently ignored. This vulnerability is fixed in 5.2.4.

GitHub Advisory Database
Summary

When allowed_origins is configured, CheckAllowedOrigins reduces URL-like values to their host component and accepts on host match alone. This makes exact origin policies impossible to express: scheme and port differences are silently ignored.

Details

CheckAllowedOrigins stores each configured allowed origin as:

parse_url($allowedOrigin)['host'] ?? $allowedOrigin

and later reduces the received clientDataJSON.origin the same way:

parse_url($C->origin)['host'] ?? $C->origin

If the reduced value matches, the method returns early. As a result, for the normal allowed_origins path, the later HTTPS check is not reached.

This differs from WebAuthn Level 2, which requires verifying that C.origin matches the RP's origin (scheme + host + port), separately from verifying that authData.rpIdHash matches the expected RP ID.

Affected code:

Spec references:

PoC

Configuration:

webauthn:
  allowed_origins:
    - https://login.example.com:8443
  allow_subdomains: false

Send a registration or authentication response whose clientDataJSON.origin is:

https://login.example.com:9443

Observed: the response is accepted, because both values are reduced to login.example.com.

Expected: the response should be rejected, because https://login.example.com:8443 and https://login.example.com:9443 are different origins.

Impact

This is an origin validation error (CWE-346) affecting deployments that use allowed_origins. The most practical browser-facing scenario is same-host / different-port origin confusion. In non-browser or custom clients, scheme confusion may also be relevant.

Fix

Fixed in version 5.2.4 by rewriting CheckAllowedOrigins to perform full origin comparison (scheme + host + port) as required by the WebAuthn spec:

  • Origins configured with a scheme (e.g. https://example.com:8443) are now stored and compared as full scheme://host[:port] values, with default port normalization (443 for HTTPS, 80 for HTTP).
  • Origins configured without a scheme are still matched by host only, for backward compatibility.
  • Subdomain matching now also verifies scheme and port consistency.

See commit b4cd9a43.

Mitigation

Upgrade to web-auth/webauthn-framework (or web-auth/webauthn-lib / web-auth/webauthn-symfony-bundle) >= 5.2.4.

NVD (es)

web-auth/webauthn-lib es un conjunto de código abierto de bibliotecas PHP y un paquete de Symfony para permitir a los desarrolladores integrar ese mecanismo de autenticación en sus aplicaciones web. Antes de la versión 5.2.4, cuando se configura allowed_origins, CheckAllowedOrigins reduce los valores similares a URL a su componente de host y acepta solo la coincidencia de host. Esto hace que las políticas de origen exactas sean imposibles de expresar: las diferencias de esquema y puerto se ignoran silenciosamente. Esta vulnerabilidad se corrige en la versión 5.2.4.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-30964 changed 2026-03-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-f7pm-6hr8-7ggm changed 2026-09-10CC-BY-4.0
NVDCVE-2026-30964 changed 2026-06-17Public domain