---
id: CVE-2026-76844
title: >-
  zlib 1.2.11 through 1.3.2 contains a heap buffer overflow: after an underlying
  write() fails, gz_write() returns without resetting strm.next_in, leaving it
  pointed at the caller's buffer
summary: >-
  zlib 1.2.11 through 1.3.2 contains a heap buffer overflow: after an underlying
  write() fails, gz_write() returns without resetting strm.next_in, leaving it
  pointed at the caller's buffer. A later gz* write call then derives a position
  fr…
severity: high
cvss: 7.4
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H'
cwe:
  - CWE-787
  - CWE-22
vendor: zlib
product: zlib
affected:
  - zlib >= 1.2.11 <= 1.3.2
patched:
  - webpack-dev-middleware 8.3.0
  - webpack-dev-middleware 7.4.6
published: '2026-08-24'
updated: '2026-10-12'
sourceUpdated: '2026-10-12T17:10:00.163'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-76844'
references:
  - url: 'https://gist.github.com/thesmartshadow/e0b9481792afb7c31e86fee1ff084490'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/madler/zlib'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/madler/zlib/blob/v1.3.2/gzwrite.c#L393'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/madler/zlib/commit/df84af25dc1942490e1d1c899a07619152a46148
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/zlib-1.3.1.2-through-1.3.2-heap-buffer-overflow-via-gz-vacate
    label: disclosure@vulncheck.com
  - url: 'https://github.com/advisories/GHSA-wr3j-pwj9-hqq6'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/webpack/webpack-dev-middleware'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/webpack/webpack-dev-middleware/blob/v8.1.1/src/middleware.js
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/webpack/webpack-dev-middleware/commit/13344e78b26d88fe9b7c8381a3860e248a52359b
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/webpack/webpack-dev-middleware/commit/cefccbac330c29052fc6dffe85fd292ea2ac782b
    label: disclosure@vulncheck.com
  - url: 'https://github.com/webpack/webpack-dev-middleware/releases/tag/v7.4.6'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/webpack/webpack-dev-middleware/releases/tag/v8.3.0'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-g84c-rxfj-3j2c
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/webpack-dev-middleware-path-traversal-via-offset-slice-on-a-non-slash-terminated-publicpath
    label: disclosure@vulncheck.com
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-76844'
  - url: 'https://github.com/webpack/webpack-dev-middleware/pull/2404'
  - url: 'https://github.com/advisories/GHSA-g84c-rxfj-3j2c'
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-76844.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-76844'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2521896'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-76844'
  - url: 'https://access.redhat.com/errata/RHSA-2026:69296'
  - url: 'https://access.redhat.com/errata/RHSA-2026:61783'
  - url: 'https://access.redhat.com/errata/RHSA-2026:68681'
tags:
  - nvd
  - cve.org
  - exploit-available
  - ghsa
  - npm
  - csaf
  - vex
  - red-hat
epss: 0.00592
epssPercentile: 0.48091
aliases:
  - GHSA-g84c-rxfj-3j2c
ecosystem: npm
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-08-26T18:22:33.313523Z'
scores:
  nvd: 7.4
  vendor: 8.6
ingestedAt: '2026-09-24T20:51:40.221Z'
---

## Overview

zlib 1.2.11 through 1.3.2 contains a heap buffer overflow: after an underlying write() fails, gz_write() returns without resetting strm.next_in, leaving it pointed at the caller's buffer. A later gz* write call then derives a position from the stale pointer and writes past a heap allocation; any write() failure reaches it, including EPIPE on a blocking descriptor, and in versions before 1.3.1.2 the failed write must be followed by a gzclearerr() call.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-76844)

Affected packages:

- `webpack-dev-middleware >= 8.0.0, < 8.3.0`
- `webpack-dev-middleware < 7.4.5`

Patched in:

- `webpack-dev-middleware 8.3.0`
- `webpack-dev-middleware 7.4.6`

Source: https://github.com/advisories/GHSA-g84c-rxfj-3j2c

## Vendor advisories

- **RHSA-2026:69296** · Red Hat · fixed in: Red Hat Data Grid 8.6.3 · released 2026-09-21 · [advisory](https://access.redhat.com/errata/RHSA-2026:69296)
- **RHSA-2026:61783** · Red Hat · fixed in: Red Hat Discovery 2 · released 2026-08-31 · [advisory](https://access.redhat.com/errata/RHSA-2026:61783)
- **RHSA-2026:68681** · Red Hat · fixed in: Red Hat Migration Toolkit 1.8 · released 2026-09-17 · [advisory](https://access.redhat.com/errata/RHSA-2026:68681)
- **Red Hat VEX** · Important · affected: Node HealthCheck Operator, OpenShift Pipelines, Red Hat Ansible Automation Platform 2, Red Hat build of Apache Camel - HawtIO 4, Red Hat Build of Podman Desktop, Red Hat Ceph Storage 4, … · no fix planned: Red Hat Ansible Automation Platform 2, Red Hat build of Apache Camel - HawtIO 4, Red Hat Enterprise Linux AI (RHEL AI) 3, Red Hat Fuse 7, … · updated 2026-10-15 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-76844.json)
