5.3medium
Format string bug in the Redis cache implementation
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 2.73% (higher than 86% 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. 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| zmartzone mod_auth_openidc | < 2.4.9 | CVE List |
| openidc mod_auth_openidc | before 2.4.9 | NVD |
| netapp cloud_backup | Not specified | NVD |
| debian debian_linux | 10.0 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:N/I:N/A:P |
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. 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.
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 OpenID Connect Relying Party, autenticando a usuarios contra un OpenID Connect Provider. Cuando mod_auth_openidc versiones anteriores a 2.4.9 están configuradas para usar una caché Redis no cifrada ("OIDCCacheEncrypt off", "OIDCSessionType server-cache", "OIDCCacheType redis"), "mod_auth_openidc" llevaba a cabo erróneamente la interpolación de argumentos antes de pasar las peticiones de Redis a "hiredis", que lo llevaría a cabo de nuevo y conlleva a un bug de cadena de formato no controlado. La evaluación inicial muestra que este bug no parece permitir ganar la ejecución de código arbitrario, pero puede provocar de forma fiable una denegación de servicio al bloquear repetidamente los trabajadores de Apache. Este bug se ha corregido en versión 2.4.9 al llevar a cabo la interpolación de argumentos sólo una vez, usando la API "hiredis". Como solución, esta vulnerabilidad puede ser mitigada ajustando "OIDCCacheEncrypt" a "on", ya que las claves de la caché son criptografiadas con hash antes de su uso cuando esta opción está activada
References
| https://github.com/zmartzone/mod_auth_openidc/security/advisories/GHSA-55r8-6w97-xxr4 | mitigation, third-party-advisory | |
| https://github.com/zmartzone/mod_auth_openidc/commit/dc672688dc1f2db7df8ad4abebc367116017a449 | patch, third-party-advisory | |
| https://github.com/zmartzone/mod_auth_openidc/releases/tag/v2.4.9 | release-notes, third-party-advisory | |
| https://www.oracle.com/security-alerts/cpuapr2022.html | patch, third-party-advisory | |
| https://security.netapp.com/advisory/ntap-20210902-0001/ | third-party-advisory | |
| https://lists.debian.org/debian-lts-announce/2023/04/msg00034.html | mailing-list, third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-32785 changed 2024-08-03 | CVE Terms of Use |
| NVD | CVE-2021-32785 changed 2026-06-17 | Public domain |