Integer Overflow Vulnerability in curl Package Leading to Buffer Overflow

curl Updated 02 Oct 2025

Summary

05/02/2025
N/A
Yes i
Unrated
Not published

CVE-2025-0725: When libcurl is asked to perform automatic gzip decompression of content-encoded HTTP responses with the CURLOPT_ACCEPT_ENCODING option, using zlib 1.2.0.3 or older, an attacker-controlled integer overflow would make lib... Affects curl across 2 version ranges.

< 8.12.0-r0 < 76f83f0db23846e254d940ec7

Fixed in 8.12.0-r0. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

curl is a widely used command-line tool and library for transferring data with URLs. It supports various protocols, including HTTP, HTTPS, FTP, and more. curl is known for its versatility and is often utilized in web applications, APIs, and scripts for data retrieval and file transfers. However, certain versions of curl are vulnerable to an integer overflow issue when performing automatic gzip decompression of content-encoded HTTP responses, particularly when using zlib versions 1.2.0.3 or older.

Vulnerability Detail

The vulnerability, identified as CVE-2025-0725, arises when libcurl is configured to automatically decompress gzip-encoded HTTP responses using the CURLOPT_ACCEPT_ENCODING option. If the underlying zlib library is version 1.2.0.3 or older, an attacker can exploit an integer overflow, leading to a buffer overflow condition. This can potentially allow an attacker to execute arbitrary code or crash the application, posing a significant security risk.

How To Fix

Minimum fixed version

8.12.0-r0

This is the first release that contains the fix.

sudo apk add --upgrade curl

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

Workaround

As a temporary workaround, users can disable automatic gzip decompression by not setting the CURLOPT_ACCEPT_ENCODING option in their curl requests. This will prevent the vulnerability from being triggered, though it may affect the performance and efficiency of data transfers.

Conclusion

The CVE-2025-0725 vulnerability in the curl package poses a significant risk due to the potential for buffer overflow attacks. Users are strongly advised to update their curl installations to the latest patched versions and consider disabling gzip decompression as a temporary measure. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security of your applications.

See every vulnerability recorded for curl →

Share this vulnerability

FAQ

CVE-2025-0725 is a vulnerability in the curl package that can lead to a buffer overflow due to an integer overflow when decompressing gzip-encoded HTTP responses.

All versions of curl that utilize zlib 1.2.0.3 or older for gzip decompression are affected by this vulnerability.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Simply upload your manifest file like package-lock.json to check for vulnerabilities.

If an immediate update is not possible, consider disabling gzip decompression in your curl requests as a temporary workaround.

More details about CVE-2025-0725 can be found in the official CVE database and security advisories related to the curl package.

Related vulnerabilities

Recent vulnerabilities recorded for curl.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

8.12.0-r0

This is the first release that contains the fix.

sudo apk add --upgrade curl

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