Skip to content
Memory corruption Disclosed report Advanced CVE-2025-0725

CVE-2025-0725: Heap overflow in curl with Content-Encoding gzip and old libz versions

An integer overflow in curl's handling of gzip headers when built against old libz versions can be triggered by a malicious HTTP server sending abnormally large gzip headers, leading to a heap overflow with attacker-controlled data. The attacker could potentially corrupt memory when curl processes a response with Content-Encoding: gzip.

z2_ Follow

Originally disclosed on HackerOne

  • Disclosed after 3 months

Hello, I would like to report a vulnerability here that I previously reported to the curl project.

In curl's support for old libz version lies an integer overflow that can be triggered by a malicious http server by serving abnormally large gzip headers that then leads to a heap overflow with attacker-controlled data when Content-Encoding: gzip is used.

Original report: https://hackerone.com/reports/2956023 CVE: CVE-2025-0725 Severity: Low Official Advisory: https://curl.se/docs/CVE-2025-0725.html

Impact

-

The original report as published on HackerOne, by z2_. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely an integer overflow in curl's gzip decompression code when using old libz versions, where a size calculation wraps around and leads to a heap buffer overflow.

Impact

A malicious HTTP server could cause a heap overflow with attacker-controlled data, potentially leading to memory corruption, though the report rates severity as low.

What the attacker needed

Curl built with an old libz version; malicious HTTP server; victim uses curl to fetch from server

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

curl downloads things from the internet. When it gets gzip-compressed data, it uses libz to decompress it. With old libz versions, a maths mistake (integer overflow) can happen when the gzip header is very large, causing curl to write outside the intended memory area, a heap overflow.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by z2_

View all

11 more disclosed reports, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.