# CVE-2024-8975: Grafana Alloy on Windows Unquoted service path

> Local attackers can escalate privileges to SYSTEM on Windows due to an unquoted service path in Grafana Alloy.

- **Severity:** High 7.3 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 25 Sep 2024
- **Updated:** 26 Sep 2024
- **Also known as:** BIT-grafana-alloy-2024-8975, GHSA-chqx-36rm-rf8h, GO-2024-3168

## What is CVE-2024-8975?

CVE-2024-8975 is a high-severity vulnerability in Grafana Alloy, published on 25 Sep 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

Unquoted Search Path or Element vulnerability in Grafana Alloy on Windows allows Privilege Escalation from Local User to SYSTEM
This issue affects Alloy: before 1.3.3, from 1.4.0-rc.0 through 1.4.0-rc.1.

Weakness: CWE-428 (Unquoted Search Path or Element)

## Which versions are affected by CVE-2024-8975?

6 open source packages ship an affected version, including github.com/grafana/alloy and grafana-alloy. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/grafana/alloy` | Go | All versions | 1.3.4, 1.4.1 |
| `github.com/grafana/alloy` | Go | All versions | 1.3.4 |
| `github.com/grafana/alloy` | Go | All versions | 1.3.4 |
| `github.com/grafana/alloy` | Go | From 1.4.0-rc.0 | 1.4.1 |
| `github.com/grafana/alloy` | Go | From 1.4.0-rc.0 | 1.4.1 |
| `grafana-alloy` | Bitnami | All versions to 1.4.0-rc0 | None |

Products: Grafana Alloy.

## How do I fix CVE-2024-8975?

Upgrade github.com/grafana/alloy to a fixed version for your release line: 1.3.4 or 1.4.1.

## Is CVE-2024-8975 being exploited?

There is no known exploitation of CVE-2024-8975 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-8975 and fix it if it is affected.

What it is: CVE-2024-8975 is a high-severity vulnerability in Grafana Alloy, published on 25 Sep 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-8975 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/grafana/alloy (Go): affected all versions; fixed in 1.3.4, 1.4.1
- github.com/grafana/alloy (Go): affected all versions; fixed in 1.3.4
- github.com/grafana/alloy (Go): affected all versions; fixed in 1.3.4
- github.com/grafana/alloy (Go): affected from 1.4.0-rc.0; fixed in 1.4.1
- github.com/grafana/alloy (Go): affected from 1.4.0-rc.0; fixed in 1.4.1
- grafana-alloy (Bitnami): affected all versions up to 1.4.0-rc0; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-8975/ (Markdown: https://insights.sbomify.com/CVE-2024-8975/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-8975
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-8975
- OSV: https://osv.dev/vulnerability/CVE-2024-8975

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-8975/
Summaries are generated and may contain mistakes; the official description above is the record.
