CVE-2021-32786
JSON

4.7medium

Open Redirect in oidc_validate_redirect_url()

Severity
4.7medium CVSS:3.1 by GitHub_M
Exploit likelihood
2.34% (higher than 84% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

Description

mod_auth_openidc is an authentication/authorization module for the Apache 2.x HTTP server that functions as an OpenID Connect Relying Party, authenticating users against an OpenID Connect Provider. In versions prior to 2.4.9, `oidc_validate_redirect_url()` does not parse URLs the same way as most browsers do. As a result, this function can be bypassed and leads to an Open Redirect vulnerability in the logout functionality. This bug has been fixed in version 2.4.9 by replacing any backslash of the URL to redirect with slashes to address a particular breaking change between the different specifications (RFC2396 / RFC3986 and WHATWG). As a workaround, this vulnerability can be mitigated by configuring `mod_auth_openidc` to only allow redirection whose destination matches a given regular expression.

Affected

Product or packageVersionsReported by
zmartzone mod_auth_openidc< 2.4.9CVE List
openidc mod_auth_openidcbefore 2.4.9NVD
fedoraproject fedora33, 34NVD

All scores

GitHub_M4.7medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD5.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:N

Classification

What each source says

CVE List

mod_auth_openidc is an authentication/authorization module for the Apache 2.x HTTP server that functions as an OpenID Connect Relying Party, authenticating users against an OpenID Connect Provider. In versions prior to 2.4.9, `oidc_validate_redirect_url()` does not parse URLs the same way as most browsers do. As a result, this function can be bypassed and leads to an Open Redirect vulnerability in the logout functionality. This bug has been fixed in version 2.4.9 by replacing any backslash of the URL to redirect with slashes to address a particular breaking change between the different specifications (RFC2396 / RFC3986 and WHATWG). As a workaround, this vulnerability can be mitigated by configuring `mod_auth_openidc` to only allow redirection whose destination matches a given regular expression.

NVD (es)

mod_auth_openidc es un módulo de autenticación/autorización para el servidor HTTP Apache versión 2.x que funciona como un OpenID Connect Relying Party, autenticando a usuarios contra un OpenID Connect Provider. En versiones anteriores a 2.4.9, "oidc_validate_redirect_url()" no analiza las URLs de la misma manera que la mayoría de los navegadores. Como resultado, esta función puede ser omitida y conlleva a una vulnerabilidad de Redirección Abierta en la funcionalidad logout. Este bug ha sido corregido en versión 2.4.9 al reemplazar cualquier barra invertida de la URL a redirigir por barras inclinadas para solucionar un cambio particular de ruptura entre las diferentes especificaciones (RFC2396 / RFC3986 y WHATWG). Como solución, esta vulnerabilidad puede ser mitigada configurando "mod_auth_openidc" para que sólo permita la redirección cuyo destino coincida con una expresión regular determinada

References

https://github.com/zmartzone/mod_auth_openidc/releases/tag/v2.4.9release-notes, third-party-advisory
https://github.com/zmartzone/mod_auth_openidc/security/advisories/GHSA-xm4c-5wm5-jqv7third-party-advisory
https://github.com/zmartzone/mod_auth_openidc/commit/3a115484eb927bc6daa5737dd84f88ff4bbc5544patch, third-party-advisory
https://daniel.haxx.se/blog/2017/01/30/one-url-standard-please/exploit, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FZVF6BSJLRQZ7PFFR4X5JSU6KUJYNOCU/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QXAWKPT5LXZSUTFSJ6IWSZC7RMYYQXQD/vendor-advisory
https://www.oracle.com/security-alerts/cpuapr2022.htmlpatch, third-party-advisory
https://security.netapp.com/advisory/ntap-20210902-0001/third-party-advisory
https://lists.debian.org/debian-lts-announce/2023/04/msg00034.htmlmailing-list

Sources

SourceRecordLicence
CVE ListCVE-2021-32786 changed 2024-08-03CVE Terms of Use
NVDCVE-2021-32786 changed 2026-06-17Public domain