---
id: CVE-2026-87877
title: >-
  zstd-jni versions before 1.5.7-14 fail to validate closed state in setDict,
  setLongMax, setLevel and setRefMultipleDDicts methods of stream classes
summary: >-
  zstd-jni versions before 1.5.7-14 fail to validate closed state in setDict,
  setLongMax, setLevel and setRefMultipleDDicts methods of stream classes.
  Attackers can call these methods on closed streams to write through freed
  native pointer…
severity: high
cvss: 7.7
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H'
cwe:
  - CWE-416
vendor: luben
product: zstd-jni
affected:
  - zstd-jni >= 1.3.8-4 < 1.5.7-14
published: '2026-09-09'
updated: '2026-09-09'
sourceUpdated: '2026-09-09T20:16:54.383'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-87877'
references:
  - url: 'https://github.com/luben/zstd-jni'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/luben/zstd-jni/blob/v1.5.7-13/src/main/java/com/github/luben/zstd/BaseZstdBufferDecompressingStreamNoFinalizer.java
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/luben/zstd-jni/blob/v1.5.7-13/src/main/java/com/github/luben/zstd/ZstdInputStreamNoFinalizer.java
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/luben/zstd-jni/commit/0827ed02551bbd8d6f8e4bbff99d83bf50f91938
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/luben/zstd-jni/commit/393d7311766abbc285b149302c0fe1f94b16d555
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/luben/zstd-jni/commit/f38f9a1563113d96d0fc38baee543f7457dd8a8e
    label: disclosure@vulncheck.com
  - url: 'https://github.com/luben/zstd-jni/releases/tag/v1.5.7-14'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/luben/zstd-jni/security/advisories/GHSA-2jw3-mg7f-vw4q'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/zstd-jni-1.3.8-4-through-1.5.7-13-use-after-free-via-setters-called-after-close
    label: disclosure@vulncheck.com
  - url: 'https://github.com/luben/zstd-jni/security/advisories/GHSA-2jw3-mg7f-vw4q'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-87877.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-87877'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2531003'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-87877'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-87877'
  - url: 'https://access.redhat.com/errata/RHSA-2026:71675'
tags:
  - nvd
  - cve.org
  - exploit-available
  - csaf
  - vex
  - red-hat
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-09-09T15:57:38.917828Z'
ingestedAt: '2026-09-14T14:15:33.402Z'
epss: 0.00202
epssPercentile: 0.08973
patched:
  - build_of_apache_camel_4_18_4_for_spring_boot 3.5.16
---

## Overview

zstd-jni versions before 1.5.7-14 fail to validate closed state in setDict, setLongMax, setLevel and setRefMultipleDDicts methods of stream classes. Attackers can call these methods on closed streams to write through freed native pointers, corrupting unrelated objects or crashing the JVM.

## Remediation

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

## Vendor advisories

- **Red Hat VEX** · Important · affected: Exploit Intelligence, OpenShift Developer Tools and Services, Red Hat build of Apache Camel 4 for Quarkus 3, Red Hat build of Apicurio Registry 3, Red Hat build of Debezium 3, Red Hat Ceph Storage 9, … · no fix planned: Red Hat Ceph Storage 9, Exploit Intelligence, OpenShift Developer Tools and Services, Red Hat build of Apache Camel 4 for Quarkus 3, … · updated 2026-09-24 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-87877.json)
- **RHSA-2026:71675** · Red Hat · fixed in: Red Hat build of Apache Camel 4.18.4 for Spring Boot 3.5.16 · released 2026-09-24 · [advisory](https://access.redhat.com/errata/RHSA-2026:71675)
