---
id: CVE-2026-87824
title: >-
  zstd-jni before 1.5.7-14 fails to validate the samples buffer capacity in
  Zstd.trainFromBufferDirect, allowing attackers to read past buffer boundaries
  by supplying oversized per-sample lengths
summary: >-
  zstd-jni before 1.5.7-14 fails to validate the samples buffer capacity in
  Zstd.trainFromBufferDirect, allowing attackers to read past buffer boundaries
  by supplying oversized per-sample lengths. Attackers can trigger out-of-bounds
  memory…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-125
vendor: luben
product: zstd-jni
affected:
  - zstd-jni >= 1.3.3-1 < 1.5.7-14
published: '2026-09-09'
updated: '2026-09-20'
sourceUpdated: '2026-09-20T01:16:31.623'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-87824'
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/Zstd.java
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/luben/zstd-jni/blob/v1.5.7-13/src/main/native/jni_zdict.c
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/luben/zstd-jni/commit/53d3c6342883f7d6717b2477a7f9c1b4a4a56980
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/luben/zstd-jni/commit/bba6cfca2c0897f1fa004f4193247479f10da853
    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-257p-3h6w-pg7h'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/zstd-jni-1.3.3-1-through-1.5.7-13-out-of-bounds-read-via-zstd-trainfrombufferdirect
    label: disclosure@vulncheck.com
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-87824.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-87824'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2530998'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-87824'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-87824'
  - url: 'https://access.redhat.com/errata/RHSA-2026:71675'
tags:
  - nvd
  - cve.org
  - csaf
  - vex
  - red-hat
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-09-20T00:08:06.268866Z'
epss: 0.00716
epssPercentile: 0.51788
ingestedAt: '2026-09-10T19:29:24.706Z'
patched:
  - build_of_apache_camel_4_18_4_for_spring_boot 3.5.16
---

## Overview

zstd-jni before 1.5.7-14 fails to validate the samples buffer capacity in Zstd.trainFromBufferDirect, allowing attackers to read past buffer boundaries by supplying oversized per-sample lengths. Attackers can trigger out-of-bounds memory access by providing crafted sample length arrays that cause the native implementation to walk past the buffer allocation, resulting in JVM termination.

## 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-87824.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)
