Bug 1955751 (CVE-2021-31232)

Summary: CVE-2021-31232 cortex: Alertmanager can expose local files content via specially crafted config
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: amctagga, gghezzo, gparvin, grafana-maint, jcantril, jkurik, jramanat, jweiser, muagarwa, nathans, nbecker, njean, ocs-bugs, owatkins, pahickey, periklis, scox, stcannon, teagle, thee
Target Milestone: ---Keywords: Reopened, Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cortex 1.8.1 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Cortex that may allow a local attacker to obtain sensitive information. This is due to an issue in the Alertmanager when -experimental.alertmanager.enable-api is used. By using a webhook to send file content, an attacker can load any text file specified in the templates list, obtain sensitive information, and use this information to launch further attacks against the affected system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-14 12: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: 2183174    
Bug Blocks: 1955753    

Description Pedro Sampaio 2021-04-30 18:08:34 UTC
The Alertmanager in CNCF Cortex before 1.8.1 has a local file disclosure vulnerability when -experimental.alertmanager.enable-api is used. The HTTP basic auth password_file can be used as an attack vector to send any file content via a webhook. The alertmanager templates can be used as an attack vector to send any file content because the alertmanager can load any text file specified in the templates list.

References:

https://community.grafana.com/c/security-announcements
https://github.com/cortexproject/cortex
https://github.com/cortexproject/cortex/pull/4129/files
https://lists.cncf.io/g/cortex-users/message/50

Comment 1 Product Security DevOps Team 2021-05-18 14:38:22 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-31232

Comment 2 Avinash Hanwate 2023-03-30 13:47:55 UTC
Created grafana tracking bugs for this issue:

Affects: fedora-all [bug 2183174]

Comment 3 Product Security DevOps Team 2023-04-14 12:39:46 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-31232