Bug 2001646 (CVE-2021-39191)

Summary: CVE-2021-39191 mod_auth_openidc: open redirect due to target_link_uri parameter not validated
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jhrozek, puiterwijk, spoore, thalman
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mod_auth_openidc 2.4.9.4 Doc Type: If docs needed, set a value
Doc Text:
A open redirect flaw was found in mod_auth_openidc where it does not sanitize target_link_uri paramater properly. This issue could be used by a remote attacker to facilitate phishing attacks by tricking users into visiting a trusted web application URL that redirects to an external and potentially malicious server. As a result of this redirection victim users may give more credibility to the attacker controlled server because coming from a trusted application.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-11 03:16:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2001647, 2001852, 2001853    
Bug Blocks: 2001648    

Description Guilherme de Almeida Suckevicz 2021-09-06 16:40:11 UTC
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.4, the 3rd-party init SSO functionality of mod_auth_openidc was reported to be vulnerable to an open redirect attack by supplying a crafted URL in the `target_link_uri` parameter. A patch in version 2.4.9.4 made it so that the `OIDCRedirectURLsAllowed` setting must be applied to the `target_link_uri` parameter. There are no known workarounds aside from upgrading to a patched version.

References:
https://github.com/zmartzone/mod_auth_openidc/security/advisories/GHSA-2pgf-8h6h-gqg2
https://github.com/zmartzone/mod_auth_openidc/issues/672

Upstream patch:
https://github.com/zmartzone/mod_auth_openidc/commit/03e6bfb446f4e3f27c003d30d6a433e5dd8e2b3d

Comment 1 Guilherme de Almeida Suckevicz 2021-09-06 16:40:24 UTC
Created mod_auth_openidc tracking bugs for this issue:

Affects: fedora-all [bug 2001647]

Comment 4 errata-xmlrpc 2022-05-10 13:40:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:1823 https://access.redhat.com/errata/RHSA-2022:1823

Comment 5 Product Security DevOps Team 2022-05-11 03:16:54 UTC
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-2021-39191