Build ActionApplication · Gradle

CVE-2023-30853

MEDIUM · 6.5 CVSS v3.1 Published 2023-04-28
Fix available
A fix is available. Upgrade to 2.4.2 or later.
See remediation →
71/100
Remediation priority · Elevated
Remotely reachable 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
Gradle Build Action allows users to execute a Gradle Build in their GitHub Actions workflow. A vulnerability impacts GitHub workflows using the Gradle Build Action prior to version 2.4.2 that have executed the Gradle Build Tool with the configuration cache enabled, potentially exposing secrets configured for the repository. Secrets configured for GitHub Actions are normally passed to the Gradle Build Tool via environment variables. Due to the way that the Gradle Build Tool records these environment variables, they may be persisted into an entry in the GitHub Actions cache. This data stored in the GitHub Actions cache can be read by a GitHub Actions workflow running in an untrusted context, such as that running for a Pull Request submitted by a developer via a repository fork. This vulnerability was discovered internally through code review, and we have not seen any evidence of it being exploited in the wild. However, in addition to upgrading the Gradle Build Action, affected users should delete any potentially vulnerable cache entries and may choose to rotate any potentially affected secrets. Gradle Build Action v2.4.2 and newer no longer saves this sensitive data for later use, preventing ongoing leakage of secrets via the GitHub Actions Cache. While upgrading to the latest version of the Gradle Build Action will prevent leakage of secrets going forward, additional actions may be required due to current or previous GitHub Actions Cache entries containing this information. Current cache entries will remain vulnerable until they are forcibly deleted or they expire naturally after 7 days of not being used. Potentially vulnerable entries can be easily identified in the GitHub UI by searching for a cache entry with key matching `configuration-cache-*`. The maintainers recommend that users of the Gradle Build Action inspect their list of cache entries and manually delete any that match this pattern. While maintainers have not seen any evidence of this vulnerability being exploited, they recommend cycling any repository secrets if you cannot be certain that these have not been compromised. Compromise could occur if a user runs a GitHub Actions workflow for a pull request attempting to exploit this data. Warning signs to look for in a pull request include: - Making changes to GitHub Actions workflow files in a way that may attempt to read/extract data from the Gradle User Home or `<project-root>/.gradle` directories. - Making changes to Gradle build files or other executable files that may be invoked by a GitHub Actions workflow, in a way that may attempt to read/extract information from these locations. Some workarounds to limit the impact of this vulnerability are available: - If the Gradle project does not opt-in to using the configuration cache, then it is not vulnerable. - If the Gradle project does opt-in to using the configuration-cache by default, then the `--no-configuration-cache` command-line argument can be used to disable this feature in a GitHub Actions workflow. In any case, we recommend that users carefully inspect any pull request before approving the execution of GitHub Actions workflows. It may be prudent to require approval for all PRs from external contributors.

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

The Gradle Build Action prior to v2.4.2 with configuration cache enabled inadvertently persists GitHub Actions secrets (passed via environment variables) into GitHub Actions cache entries with keys matching 'configuration-cache-*'. These cached secrets can be accessed by untrusted workflows, such as those running on pull requests from forks.

MitigationUpgrade Gradle Build Action to v2.4.2 or newer, delete all existing cache entries matching 'configuration-cache-*', and consider rotating any potentially exposed secrets.

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 ActionApplication
Affected:< 2.4.2

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
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

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

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 Gradle Build Action usage in workflows
    Examine .github/workflows/*.yml files for 'uses: gradle/build-action@' and note the version tag (e.g., v2.4.1 or earlier)
    Affected if The version tag is absent or shows a version lower than v2.4.2
  2. Verify configuration cache is enabled
    Search for 'org.gradle.configuration-cache=true' in gradle.properties, build.gradle, or settings.gradle files within the repository
    Affected if Configuration cache is set to true (or not explicitly set to false) in any Gradle build configuration file
  3. Confirm secrets are passed as environment variables
    Review .github/workflows/*.yml files for steps that set GITHUB_ENV or pass ${{ secrets.* }} as environment variables to Gradle-based build steps
    Affected if Any workflow job uses environment variables populated from GitHub secrets (e.g., env: MY_SECRET: ${{ secrets.MY_SECRET }})
  4. Check for existing configuration-cache cache entries
    Navigate to GitHub repository Actions > Caches, or use GitHub CLI 'gh cache list' to list cache entries, and look for any entries with keys beginning with 'configuration-cache-'
    Affected if Any cache entries exist with keys matching 'configuration-cache-*' pattern

You are affected if using Gradle Build Action version below v2.4.2 with configuration cache enabled and secrets passed as environment variables, and any 'configuration-cache-*' cache entries exist in your repository.

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 2.4.2 or later
Fixed in 2.4.2
Interim mitigation

Upgrade Gradle Build Action to v2.4.2 or newer, delete all existing cache entries matching 'configuration-cache-*', and consider rotating any potentially exposed secrets.

Recommended fix High confidence

Gradle Build Action v2.4.2 or newer

  1. Upgrade the Gradle Build Action to version 2.4.2 or newer in your GitHub Actions workflow YAML files
  2. Delete existing GitHub Actions cache entries that match the pattern `configuration-cache-*` - these can be found and removed via the GitHub UI under Actions > Caches
  3. Consider rotating any repository secrets that may have been exposed, as a precautionary measure
  4. As an additional precaution, review any pull requests from external contributors carefully before approving workflow execution

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

Fix this in Build Action Scoped from the published advisory
  • Consultation2.0 h
  • Implementation2.0 h
  • Testing1.0 h
  • Review / QA1.0 h
6.0 hours of engineering $1,090
Get the upgrade done

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2023-30853 — 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-2023-30853 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