Build Cache NodeApplication · Gradle

CVE-2021-41589

CRITICAL · 9.8 CVSS v3.1 Published 2021-10-27
Fix available
A fix is available. Upgrade to 10.0 / 2021.3 or later.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
In Gradle Enterprise before 2021.3 (and Enterprise Build Cache Node before 10.0), there is potential cache poisoning and remote code execution when running the build cache node with its default configuration. This configuration allows anonymous access to the configuration user interface and anonymous write access to the build cache. If access control to the build cache is not changed from the default open configuration, a malicious actor with network access can populate the cache with manipulated entries that may execute malicious code as part of a build process. This applies to the build cache provided with Gradle Enterprise and the separate build cache node service if used. If access control to the user interface is not changed from the default open configuration, a malicious actor can undo build cache access control in order to populate the cache with manipulated entries that may execute malicious code as part of a build process. This does not apply to the build cache provided with Gradle Enterprise, but does apply to the separate build cache node service if used.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Gradle Enterprise and Build Cache Node versions prior to 2023 and 10.0 respectively ship with default configurations permitting anonymous access to the admin UI and anonymous write access to the build cache. Attackers with network access can inject malicious cached build artifacts that execute arbitrary code during subsequent build operations.

MitigationDisable anonymous access by configuring authentication and authorization controls on the build cache node and configuration UI; restrict write access to authenticated, authorized users only.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Build Cache NodeApplication
Affected:< 10.0
EnterpriseApplication
Affected:< 2021.3

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed Gradle Build Cache Node version
    Locate the version information in the Build Cache Node admin UI under 'About' or check the startup logs, or query the version API endpoint if accessible
    Affected if Version is below 10.0
  2. Identify installed Gradle Enterprise version
    Locate the version information in the Gradle Enterprise admin UI under 'About' or check the application logs
    Affected if Version is below 2021.3
  3. Verify admin UI access controls
    Navigate to the admin UI settings and examine the authentication configuration for the administrative interface
    Affected if Anonymous access is permitted to the admin UI
  4. Verify build cache write access controls
    Navigate to the build cache node settings and examine the authorization configuration for cache write operations
    Affected if Anonymous/unauthenticated users have write access to the build cache

A user is affected if they run Gradle Enterprise below 2021.3 or Build Cache Node below 10.0 AND anonymous access to the admin UI or anonymous write access to the build cache is enabled in the default configuration.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 10.0 / 2021.3 or later
Fixed in 10.02021.3
Interim mitigation

Disable anonymous access by configuring authentication and authorization controls on the build cache node and configuration UI; restrict write access to authenticated, authorized users only.

Recommended fix High confidence

Gradle Enterprise 2021.3 or later, Build Cache Node 10.0 or later

  1. Back up the current Gradle Enterprise or Build Cache Node configuration and data
  2. Upgrade Gradle Enterprise to version 2021.3 or later, OR upgrade Build Cache Node to version 10.0 or later
  3. After upgrade, verify that access control settings are properly configured by enabling authentication for the configuration user interface
  4. Configure appropriate access control for the build cache (enable authentication and authorization)
  5. Restart the service after making configuration changes
  6. Verify the build cache is functioning correctly with the new security settings
Caveat Minor - the main change is that the default configuration now properly secures the interface; ensure build clients are configured with appropriate authentication if required

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Build Cache Node Scoped from the published advisory
  • Consultation4.0 h
  • Implementation6.0 h
  • Testing4.0 h
  • Review / QA2.0 h
16.0 hours of engineering $2,840
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,544.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-41589 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-41589 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data