Vulnerability · Published Dec 19, 2022 · Assigned by GitHub_M
CVE-2022-23536Alertmanager can expose local files content via specially crafted config
Medium 6.5
In plain English
A medium-severity security flaw in cortex from cortexproject. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 57% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Cortex provides multi-tenant, long term storage for Prometheus. A local file inclusion vulnerability exists in Cortex versions 1.13.0, 1.13.1 and 1.14.0, where a malicious actor could remotely read local files as a result of parsing maliciously crafted Alertmanager configurations when submitted to the Alertmanager Set Configuration API. Only users of the Alertmanager service where `-experimental.alertmanager.enable-api` or `enable_api: true` is configured are affected. Affected Cortex users are advised to upgrade to patched versions 1.13.2 or 1.14.1. However as a workaround, Cortex administrators may reject Alertmanager configurations containing the `api_key_file` setting in the `opsgenie_configs` section before sending to the Set Alertmanager Configuration API.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/cortexproject/cortex | 1.14.1 | GHSA-cq2g-pw6q-hf7j |
| Go | github.com/cortexproject/cortex | 1.13.2 | GHSA-cq2g-pw6q-hf7j |
| Go | github.com/cortexproject/cortex | 1.13.2, 1.14.1 | GO-2022-1175 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| cortexproject | cortex | >= 1.13.0, <= 1.13.1= 1.14.0 |
Weakness: CWE-73, CWE-184, CWE-641 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
References
- https://github.com/cortexproject/cortex/security/advisories/GHSA-cq2g-pw6q-hf7j x_refsource_CONFIRM
- https://cortexmetrics.io/docs/api/#set-alertmanager-configuration x_refsource_MISC
- https://github.com/cortexproject/cortex/releases/tag/v1.13.2 x_refsource_MISC
- https://github.com/cortexproject/cortex/releases/tag/v1.14.1 x_refsource_MISC