CVEfocus › CVE database › CVE-2021-32786

CVE-2021-32786Open Redirect in oidc_validate_redirect_url()

CVSS 4.7 MediumEPSS 2.4% (higher than 85% of CVEs)Published 2021-07-22Updated 2024-08-03Assigner: GitHub_M

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.

CWE-601

What to do

Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

11Fixed
3Fix pending
1Will not fix
5Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04libapache2-mod-auth-openidcNot affected
vulnerable_code_not_present
Ubuntu 25.10libapache2-mod-auth-openidcNot affected
vulnerable_code_not_present
Ubuntu 24.04libapache2-mod-auth-openidcNot affected
vulnerable_code_not_present
Ubuntu 22.04libapache2-mod-auth-openidcNot affected
vulnerable_code_not_present
Ubuntu 20.04libapache2-mod-auth-openidcFix pendingUBUNTU-CVE-2021-32786
Ubuntu 18.04libapache2-mod-auth-openidcFix pendingUBUNTU-CVE-2021-32786
Ubuntu 16.04libapache2-mod-auth-openidcFix pending
Debian 14libapache2-mod-auth-openidcFixed2.4.9-1DEBIAN-CVE-2021-32786
Debian 13libapache2-mod-auth-openidcFixed2.4.9-1DEBIAN-CVE-2021-32786
Debian 12libapache2-mod-auth-openidcFixed2.4.9-1DEBIAN-CVE-2021-32786
Red Hat Enterprise Linux 9mod_auth_openidcNot affected
Red Hat Enterprise Linux 8cjoseFixed0:0.6.1-2.module+el8+2454+f890a43aRHSA-2022:1823
Red Hat Enterprise Linux 8cjose-develFixed0:0.6.1-2.module+el8+2454+f890a43aRHSA-2022:1823
Red Hat Enterprise Linux 8mod_auth_openidcFixed0:2.3.7-11.module+el8.6.0+14082+b6f23e95RHSA-2022:1823
Red Hat Enterprise Linux 7mod_auth_openidcWill not fix
Out of support scope
AlmaLinux 8cjoseFixed0.6.1-2.module_el8.6.0+2868+44838709ALSA-2022:1823
AlmaLinux 8cjose-develFixed0.6.1-2.module_el8.6.0+2868+44838709ALSA-2022:1823
AlmaLinux 8mod_auth_openidcFixed2.3.7-11.module_el8.6.0+2868+44838709ALSA-2022:1823
Rocky Linux 8cjoseFixed0:0.6.1-2.module+el8.3.0+129+2feafa46RLSA-2022:1823
Rocky Linux 8mod_auth_openidcFixed0:2.3.7-11.module+el8.6.0+840+73eca44eRLSA-2022:1823

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.