CVE-2021-32785
JSON

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 packageVersionsReported by
zmartzone mod_auth_openidc< 2.4.9CVE List
openidc mod_auth_openidcbefore 2.4.9NVD
netapp cloud_backupNot specifiedNVD
debian debian_linux10.0NVD

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD4.3medium CVSS:2.0AV: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

Sources

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