Critical Code Execution Vulnerability in Groovy Package

groovy Updated 02 Oct 2025

Summary

18/01/2018
N/A
Yes i
Critical
9.8

CVE-2016-6814: When an application with unsupported Codehaus versions of Groovy from 1.7.0 to 2.4.3, Apache Groovy 2.4.4 to 2.4.7 on classpath uses standard Java serialization mechanisms, e.g. Affects groovy across 3 version ranges.

< 2.4.8-1 >= 716b0b1bd56eeab04e4441eecc91c2cd8bfda8b6, <= 042950dc23257bbc65cd2258f2fd2a197a98f802 >= e0407c58f79853e53e827e0eb52aaac2a39c6936, <= 1212b292c34804e3f14af2fbda5daaa85037a039

Fixed in 2.4.8-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Groovy is an agile and dynamic language for the Java Virtual Machine (JVM) that integrates seamlessly with existing Java classes and libraries. It is widely used for scripting, testing, and building applications. However, certain versions of Groovy, specifically from Codehaus versions 1.7.0 to 2.4.3 and Apache Groovy 2.4.4 to 2.4.7, are susceptible to a serious vulnerability that allows attackers to execute arbitrary code through deserialization.

Vulnerability Detail

The vulnerability, identified as CVE-2016-6814, arises when applications using the affected versions of Groovy employ standard Java serialization mechanisms. An attacker can create a specially crafted serialized object that, when deserialized, executes arbitrary code on the server. This poses a significant risk as it can lead to unauthorized access, data breaches, and complete system compromise. Applications that do not isolate the deserialization process are particularly vulnerable.

How To Fix

Minimum fixed version

2.4.8-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade groovy

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading is not immediately feasible, consider implementing strict controls around the deserialization process. This includes validating and sanitizing incoming serialized data and using alternative serialization methods that do not allow for code execution.

Conclusion

CVE-2016-6814 represents a critical vulnerability in certain versions of the Groovy package that can lead to severe security risks through code execution via deserialization. It is crucial for users to upgrade to a secure version and implement best practices for deserialization to protect their applications.

See every vulnerability recorded for groovy →

Share this vulnerability

FAQ

CVE-2016-6814 is a vulnerability in Groovy that allows attackers to execute arbitrary code through deserialization of specially crafted objects.

The affected versions include Groovy from Codehaus versions 1.7.0 to 2.4.3 and Apache Groovy versions 2.4.4 to 2.4.7.

Exploitation of this vulnerability can lead to unauthorized access, data breaches, and potentially complete control over the affected system.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application against this vulnerability using the Vulert playground without any signup.

The CVSS score for CVE-2016-6814 is 9.8, indicating a critical level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for groovy.

How To Fix

Minimum fixed version

2.4.8-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade groovy

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback