CVE-2021-41588
Gradle vulnerability analysis and mitigation

Overview

In Gradle Enterprise before 2021.1.3, a crafted request can trigger deserialization of arbitrary unsafe Java objects. The vulnerability (CVE-2021-41588) was discovered in May 2021 and affects Gradle Enterprise versions from 2017.2 through 2021.1.2. The attacker must have the encryption and signing keys to exploit this vulnerability (Gradle Advisory).

Technical details

The vulnerability stems from how Gradle Enterprise handles application session data stored as client-side cookies. The session data is encrypted and signed with randomly generated, installation-specific keys before being stored. When processing a request, this data is deserialized into Java objects. This is classified as an 'insecure deserialization' or 'gadget vulnerability'. The vulnerability has a CVSS v3.1 base score of 8.1 (HIGH) with the vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

If successfully exploited, an attacker who has obtained the encryption and signing keys could craft HTTP requests that deserialize unsafe objects, potentially leading to remote code execution on the affected system (Gradle Advisory).

Mitigation and workarounds

The vulnerability was patched in Gradle Enterprise version 2021.1.3, which implemented additional measures to prevent the deserialization of arbitrary unsafe objects. The recommended mitigation is to upgrade to version 2021.1.3 or later (Gradle Advisory).

Additional resources


SourceThis report was generated using AI

Related Gradle vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-27148HIGH8.8
  • GradleGradle
  • gradle-8
NoYesFeb 25, 2025
CVE-2023-35947HIGH8.1
  • GradleGradle
  • gradle
NoYesJun 30, 2023
CVE-2023-44387MEDIUM6.5
  • GradleGradle
  • gradle
NoYesOct 05, 2023
CVE-2023-39152MEDIUM6.5
  • JavaJava
  • org.jenkins-ci.plugins:gradle
NoYesJul 26, 2023
CVE-2023-42445MEDIUM5.3
  • GradleGradle
  • gradle
NoYesOct 06, 2023

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management