A flaw was found in mod_auth_openidc before version 2.4.0.1. An open redirect issue exists in URLs with trailing slashes similar to CVE-2019-3877 in mod_auth_mellon. Upstream patch: https://github.com/zmartzone/mod_auth_openidc/commit/5c15dfb08106c2451c2c44ce7ace6813c216ba75 https://github.com/zmartzone/mod_auth_openidc/commit/ce37080c6aea30aabae8b4a9b4eea7808445cc8e https://github.com/zmartzone/mod_auth_openidc/pull/451 References: https://groups.google.com/forum/#!topic/mod_auth_openidc/boy1Ba3Gdk4
Created mod_auth_openidc tracking bugs for this issue: Affects: fedora-all [bug 1760614]
The version of mod_auth_openidc as shipped with Red Hat Enterprise Linux 7 does not contain the patched code, however due to a missing check, this issue does not manifest as an Open Redirect flaw, but it triggers a NULL pointer dereference while parsing the logout URL. For this reason, the only impact on RHEL 7 is to Availability, because the httpd process would die, even though others can take other requests.
Function oidc_handle_logout() in mod_auth_openidc.c takes care of handling requests like `https://server/redirect_uri?logout=<redirect-url>` and it uses function oidc_validate_post_logout_url() to validate the <redirect-url> (in some older versions of mod_auth_openidc the check is performed in the function oidc_handle_logout() itself). The checks are done by first parsing the URL with apr_uri_parse() and then by looking at the parsed values. However, some URLs may be incorrectly parsed by apr_uri_parse() and still be correctly used by browsers. A remote attacker may use this flaw to trick a victim user into visiting a trusted vulnerable web site which, when handling a specially crafted URL, would redirect the victim to another malicious URL, possibly performing other kinds of attacks.
Statement: It is not possible to reproduce the open redirect vulnerability in the versions of mod_auth_openidc as shipped in Red Hat Enterprise Linux 7, as a missing check makes the process crash, due to a NULL pointer dereference, instead of letting it continue with an invalid URL.
(In reply to Riccardo Schirone from comment #7) > Statement: > > It is not possible to reproduce the open redirect vulnerability in the > versions of mod_auth_openidc as shipped in Red Hat Enterprise Linux 7, as a > missing check makes the process crash, due to a NULL pointer dereference, > instead of letting it continue with an invalid URL. Thank you for the careful testing. Would you say that the crash constitutes a DoS instead?
In reply to comment #9: > (In reply to Riccardo Schirone from comment #7) > > Statement: > > > > It is not possible to reproduce the open redirect vulnerability in the > > versions of mod_auth_openidc as shipped in Red Hat Enterprise Linux 7, as a > > missing check makes the process crash, due to a NULL pointer dereference, > > instead of letting it continue with an invalid URL. > > Thank you for the careful testing. Would you say that the crash constitutes > a DoS instead? I set the CVSS for rhel-7/mod_auth_openidc to 5.8/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:L, which means Availability Impact is set to Low. The httpd server indeed crashes, but the parent httpd process does not and it just spawns new httpd children processes. I would say you could have a Denial of Service if you keep crashing the server very quickly, but I believe it is still Low impact.
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2020:3032 https://access.redhat.com/errata/RHSA-2020:3032
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s): https://access.redhat.com/security/cve/cve-2019-14857
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2020:3970 https://access.redhat.com/errata/RHSA-2020:3970