Vulnerability · Published Jul 22, 2021 · Assigned by GitHub_M
CVE-2021-32786Open Redirect in oidc_validate_redirect_url()
Medium 4.7
In plain English
A medium-severity open redirect in mod_auth_openidc from zmartzone. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.4% (higher than 84% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | cjose | 0.6.1-2.module_el8.6.0+2868+44838709 | ALSA-2022:1823 |
| AlmaLinux:8 | cjose-devel | 0.6.1-2.module_el8.6.0+2868+44838709 | ALSA-2022:1823 |
| AlmaLinux:8 | mod_auth_openidc | 2.3.7-11.module_el8.6.0+2868+44838709 | ALSA-2022:1823 |
| Debian:12 | libapache2-mod-auth-openidc | 2.4.9-1 | DEBIAN-CVE-2021-32786 |
| Debian:13 | libapache2-mod-auth-openidc | 2.4.9-1 | DEBIAN-CVE-2021-32786 |
| Debian:14 | libapache2-mod-auth-openidc | 2.4.9-1 | DEBIAN-CVE-2021-32786 |
| Rocky Linux:8 | cjose | 0:0.6.1-2.module+el8.3.0+129+2feafa46 | RLSA-2022:1823 |
| Rocky Linux:8 | mod_auth_openidc | 0:2.3.7-11.module+el8.6.0+840+73eca44e | RLSA-2022:1823 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| zmartzone | mod_auth_openidc | < 2.4.9 |
Weakness: CWE-601 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
References
- https://github.com/zmartzone/mod_auth_openidc/releases/tag/v2.4.9
- https://github.com/zmartzone/mod_auth_openidc/security/advisories/GHSA-xm4c-5wm5-jqv7
- https://github.com/zmartzone/mod_auth_openidc/commit/3a115484eb927bc6daa5737dd84f88ff4bbc5544
- https://daniel.haxx.se/blog/2017/01/30/one-url-standard-please/
- FEDORA-2021-e3017c538a vendor-advisory
- FEDORA-2021-17f5cedf66 vendor-advisory
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://security.netapp.com/advisory/ntap-20210902-0001/
- [debian-lts-announce] 20230430 [SECURITY] [DLA 3409-1] libapache2-mod-auth-openidc security update mailing-list