GHSA-CQ2G-PW6Q-HF7J
Vulnerability from github – Published: 2022-12-19 21:09 – Updated: 2023-10-02 11:04Impact
A local file inclusion vulnerability exists in Cortex versions v1.13.0, v1.13.1 and v1.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 Cortex Alertmanager service using -experimental.alertmanager.enable-api or enable_api: true are affected.
Specific Go Packages Affected
github.com/cortexproject/cortex/pkg/alertmanager
Patches
Affected Cortex users are advised to upgrade to versions 1.13.2 or 1.14.1.
Workarounds
Patching is ultimately advised. Using out-of-bound validation, Cortex administrators may reject Alertmanager configurations containing the api_key_file setting in the opsgenie_configs section and opsgenie_api_key_file in the global section before sending to the Set Alertmanager Configuration API as a workaround.
References
- Fixed Versions:
- https://github.com/cortexproject/cortex/releases/tag/v1.14.1
- https://github.com/cortexproject/cortex/releases/tag/v1.13.2
- https://cortexmetrics.io/docs/api/#set-alertmanager-configuration
For more information
If you have any questions or comments about this advisory:
- Open an issue in cortex
- Email us at cortex-team@googlegroups.com.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/cortexproject/cortex"
},
"ranges": [
{
"events": [
{
"introduced": "1.14.0"
},
{
"fixed": "1.14.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.14.0"
]
},
{
"package": {
"ecosystem": "Go",
"name": "github.com/cortexproject/cortex"
},
"ranges": [
{
"events": [
{
"introduced": "1.13.0"
},
{
"fixed": "1.13.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-23536"
],
"database_specific": {
"cwe_ids": [
"CWE-184",
"CWE-641",
"CWE-73"
],
"github_reviewed": true,
"github_reviewed_at": "2022-12-19T21:09:05Z",
"nvd_published_at": "2022-12-19T22:15:00Z",
"severity": "MODERATE"
},
"details": "### Impact\n\nA local file inclusion vulnerability exists in Cortex versions v1.13.0, v1.13.1 and v1.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](https://cortexmetrics.io/docs/api/#set-alertmanager-configuration). Only users of the Cortex Alertmanager service using `-experimental.alertmanager.enable-api` or `enable_api: true` are affected.\n\n### Specific Go Packages Affected\ngithub.com/cortexproject/cortex/pkg/alertmanager\n\n### Patches\nAffected Cortex users are advised to upgrade to versions 1.13.2 or 1.14.1.\n\n### Workarounds\nPatching is ultimately advised. Using out-of-bound validation, Cortex administrators may reject Alertmanager configurations containing the `api_key_file` setting in the `opsgenie_configs` section and `opsgenie_api_key_file` in the `global` section before sending to the [Set Alertmanager Configuration API](https://cortexmetrics.io/docs/api/#set-alertmanager-configuration) as a workaround.\n\n### References\n- Fixed Versions:\n - https://github.com/cortexproject/cortex/releases/tag/v1.14.1\n - https://github.com/cortexproject/cortex/releases/tag/v1.13.2\n- https://cortexmetrics.io/docs/api/#set-alertmanager-configuration\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [cortex](https://github.com/cortexproject/cortex/issues/new/choose)\n* Email us at [cortex-team@googlegroups.com](mailto:cortex-team@googlegroups.com).\n",
"id": "GHSA-cq2g-pw6q-hf7j",
"modified": "2023-10-02T11:04:41Z",
"published": "2022-12-19T21:09:05Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/cortexproject/cortex/security/advisories/GHSA-cq2g-pw6q-hf7j"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23536"
},
{
"type": "WEB",
"url": "https://github.com/cortexproject/cortex/commit/03e023d8b012887b31cc268d0d011b01e1e65506"
},
{
"type": "WEB",
"url": "https://cortexmetrics.io/docs/api/#set-alertmanager-configuration"
},
{
"type": "PACKAGE",
"url": "https://github.com/cortexproject/cortex"
},
{
"type": "WEB",
"url": "https://github.com/cortexproject/cortex/releases/tag/v1.13.2"
},
{
"type": "WEB",
"url": "https://github.com/cortexproject/cortex/releases/tag/v1.14.1"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2022-1175"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Cortex\u0027s Alertmanager can expose local files content via specially crafted config"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.