# CVE-2024-5899: Improper trust check in Bazel Build intellij plugin

> The Bazel plugin for IntelliJ fails to display the project trust dialog during import, allowing untrusted code execution without user consent.

- **Severity:** Low 1.0 (`CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N`)
- **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:** No
- **Published:** 18 Jun 2024
- **Updated:** 11 Sep 2025
- **Also known as:** GHSA-c445-694v-cp45, GHSA-hh9f-wmhw-46vg, GO-2024-2933

## What is CVE-2024-5899?

CVE-2024-5899 is a low-severity missing authorization vulnerability in BazelBuild intellij plugin, published on 18 Jun 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

When Bazel Plugin in intellij imports a project (either using "import project" or "Auto import") the dialog for trusting the project is not displayed. This comes from the fact that both call the method ProjectBuilder.createProject which then calls ProjectManager.getInstance().createProject. This method, as its name suggests is intended to create a new project, not to import an existing one. 
We recommend upgrading to version 2024.06.04.0.2 or beyond for the IntelliJ, CLion and Android Studio Bazel plugins.

Weakness: CWE-862 (Missing Authorization)

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

1 open source package ship an affected version, including github.com/bazelbuild/intellij. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/bazelbuild/intellij` | Go | All versions | None |

Products: Google Bazel for Android Studio, Google Bazel for Clion, Google Bazel for Intellij.

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

No fix has been published for CVE-2024-5899 yet. Limit exposure of the affected software until one is available.

## Is CVE-2024-5899 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2024-5899 is a low-severity missing authorization vulnerability in BazelBuild intellij plugin, published on 18 Jun 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-5899 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/bazelbuild/intellij (Go): affected all versions; 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-5899/ (Markdown: https://insights.sbomify.com/CVE-2024-5899/index.md)
```

## Sources

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

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