CVE-2021-32785Format string bug in the Redis cache implementation
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. When mod_auth_openidc versions prior to 2.4.9 are configured to use an unencrypted Redis cache (`OIDCCacheEncrypt off`, `OIDCSessionType server-cache`, `OIDCCacheType redis`), `mod_auth_openidc` wrongly performed argument interpolation before passing Redis requests to `hiredis`, which would perform it again and lead to an uncontrolled format string bug. Initial assessment shows that this bug does not appear to allow gaining arbitrary code execution, but can reliably provoke a denial of service by repeatedly crashing the Apache workers. This bug has been corrected in version 2.4.9 by performing argument interpolation only once, using the `hiredis` API. As a workaround, this vulnerability can be mitigated by setting `OIDCCacheEncrypt` to `on`, as cache keys are cryptographically hashed before use when this option is enabled.
What to do
Fixed builds are available from Debian: 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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | libapache2-mod-auth-openidc | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | libapache2-mod-auth-openidc | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | libapache2-mod-auth-openidc | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | libapache2-mod-auth-openidc | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | libapache2-mod-auth-openidc | Fix pending | UBUNTU-CVE-2021-32785 | |
| Ubuntu 18.04 | libapache2-mod-auth-openidc | Fix pending | UBUNTU-CVE-2021-32785 | |
| Ubuntu 16.04 | libapache2-mod-auth-openidc | Fix pending | ||
| Debian 14 | libapache2-mod-auth-openidc | Fixed | 2.4.9-1 | DEBIAN-CVE-2021-32785 |
| Debian 13 | libapache2-mod-auth-openidc | Fixed | 2.4.9-1 | DEBIAN-CVE-2021-32785 |
| Debian 12 | libapache2-mod-auth-openidc | Fixed | 2.4.9-1 | DEBIAN-CVE-2021-32785 |
| Red Hat Enterprise Linux 9 | mod_auth_openidc | Not affected | ||
| Red Hat Enterprise Linux 8 | cjose | Not affected | ||
| Red Hat Enterprise Linux 8 | cjose-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | mod_auth_openidc | Not affected | ||
| Red Hat Enterprise Linux 7 | mod_auth_openidc | Not affected |
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.
- zmartzone mod_auth_openidc: affected: < 2.4.9
References
- https://github.com/zmartzone/mod_auth_openidc/security/advisories/GHSA-55r8-6w97-xxr4
- https://github.com/zmartzone/mod_auth_openidc/commit/dc672688dc1f2db7df8ad4abebc367116017a449
- https://github.com/zmartzone/mod_auth_openidc/releases/tag/v2.4.9
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://security.netapp.com/advisory/ntap-20210902-0001/
- https://lists.debian.org/debian-lts-announce/2023/04/msg00034.html
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.