Bug 2139426 (CVE-2022-3841)

Summary: CVE-2022-3841 RHACM: unauthenticated SSRF in console API endpoint
Product: [Other] Security Response Reporter: Borja Tarraso <btarraso>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: gparvin, njean, owatkins, pahickey, stcannon, teagle
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A Server-Side Request Forgery (SSRF) vulnerability was found in the console API endpoint from Red Hat Advanced Cluster Management for Kubernetes (RHACM). An attacker could take advantage of this as the console API endpoint is missing an authentication check, allowing unauthenticated users making requests.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-20 06:39:49 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: 2139428    
Bug Blocks: 2136468    

Description Borja Tarraso 2022-11-02 13:37:03 UTC
The /api/proxy/plugin/acm/console/multicloud/ansibletower endpoint can be accessed without authentication. The only checks performed are the presence of an openshift-session-token cookie regardless of its value and setting a csrf-token cookie with a dummy value.

This endpoint allows users to supply a URL and a token of an Ansible Tower server. Upon receiving this information, the hub performs a HTTPs requests to the given URL while setting the token as the Bearer value in the Authorization header. No checks are performed on the URL and it is therefore fully controlled by the attacker.

This leads to a Server Side Request Forgery (SSRF) attack, where an attacker can supply to the server, a whole or part of, a URL that will in turn be queried by the server. This is problematic since the server is considered to be in a privileged network position and can often reach exposed services that aren't readily available to clients due to network filtering.  Leveraging such an attack vector, the attacker can have an impact on other services and potentially disclose information or have other nefarious effects on the system.

In the present case, the server fetches the URL provided by the user and returns the full response, including HTTP headers, back to the attacker.

Comment 4 errata-xmlrpc 2023-04-20 01:39:23 UTC
This issue has been addressed in the following products:

  Red Hat Advanced Cluster Management for Kubernetes 2.7 for RHEL 8

Via RHSA-2023:1888 https://access.redhat.com/errata/RHSA-2023:1888

Comment 5 Product Security DevOps Team 2023-04-20 06:39:47 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-2022-3841

Comment 6 errata-xmlrpc 2023-05-02 16:19:30 UTC
This issue has been addressed in the following products:

  Red Hat Advanced Cluster Management for Kubernetes 2.6 for RHEL 8

Via RHSA-2023:2083 https://access.redhat.com/errata/RHSA-2023:2083