CVE-2026-90799: Apache CouchDB Erlang Atom-Table Exhaustion Denial of Service
A denial of service vulnerability (CVE-2026-90799) has been disclosed in Apache CouchDB versions 3.5.2 and earlier. The chttpd component deserialized client-supplied bookmark and sequence tokens (such as /_changes?since= or /_search?bookmark=) using binary_to_term/1 without the safe flag. An authenticated client can transmit tokens containing arbitrary serialized Erlang atom primitives. Because atoms in the BEAM virtual machine are immutable and never garbage-collected, flooding the database with distinct atoms exhausts the global atom table (default 1,048,576 entries), crashing the entire database node. Upgrading to CouchDB 3.5.3 remedies the flaw. Hermes evaluates this vulnerability at HTS 75 (MEDIUM).
HERMES THREAT SCORE & ERLANG RUNTIME STABILITY
Target:Apache CouchDB Changes & Search Deserializer (/src/chttpd/) CVSS v4.0 evaluates this issue at 5.3 Medium, while CVSS v3.1 rates it at 6.5 Medium. Hermes Threat Score assigns 75 (MEDIUM). Unlike transient high-memory spikes that recover once requests complete, atom-table exhaustion is mathematically permanent for the lifetime of the OS process, forcing a full crash and manual daemon restart.
CVE-2026-90799: Apache CouchDB Erlang Atom-Table Exhaustion Denial of ServiceVULNERABILITY
1. Executive Summary & Overview
Section titled โ1. Executive Summary & OverviewโApache CouchDB relies on the Erlang/OTP BEAM virtual machine. In Erlang, atoms are constant symbolic literals stored in a globally allocated, fixed-capacity table (atom_tab). The BEAM runtime explicitly does not garbage-collect atoms. If this table reaches capacity, the BEAM emulator terminates immediately.
Prior to version 3.5.3, CouchDB decoded sequence tokens and bookmarks passed by clients in continuous changes feeds (_changes) or search endpoints (_search) using the standard binary_to_term/1 BIF. Because the safe option was omitted, arbitrary new atoms defined inside incoming binary terms were dynamically registered into the global atom table.
2. Technical Root Cause & Mechanics (CWE-502)
Section titled โ2. Technical Root Cause & Mechanics (CWE-502)โIn chttpd_misc.erl, decoding opaque pagination tokens used:
%% Vulnerable code:decode_seq(BinarySeq) -> binary_to_term(base64:decode(BinarySeq)). %% unsafe! Allocates atoms!An attacker can construct terms using the Erlang External Term Format (Tag 100 or 118 for atoms). By generating a sequence of unique random atom names (atom_1, atom_2, โฆ, atom_1048576), the table is systematically saturated:
[Client] โโโบ GET /db/_changes?since=<base64_encoded_term_with_new_atoms> โ โผ [binary_to_term/1] โโโบ [Global atom_tab Allocation] โ โผ (When count exceeds 1,048,576) [BEAM VM Fatal Panic & Exit]3. Affected Versions & Remediation Matrix
Section titled โ3. Affected Versions & Remediation Matrixโ| Product | Vulnerable Versions | Patched Version | Update Urgency |
|---|---|---|---|
| Apache CouchDB | <= 3.5.2 (All Platforms) | 3.5.3 | MEDIUM (Recommended) |
4. Detection Engineering & Threat Hunting
Section titled โ4. Detection Engineering & Threat Huntingโtitle: CouchDB Atom Table Depletion Crashid: a9079900-c04c-4db0-9799-couchdb00005status: experimentaldescription: Detects Erlang crash dump files indicating atom_tab exhaustion in CouchDB deployments.logsource: category: file_event service: couchdbdetection: selection: TargetFilename|endswith: 'erl_crash.dump' content: - 'no more index entries in atom_tab' condition: selection and contentlevel: high5. Remediation & Hardening Roadmap
Section titled โ5. Remediation & Hardening Roadmapโ-
Apply Apache CouchDB 3.5.3: The update replaces
binary_to_term/1withbinary_to_term(Term, [safe]), strictly rejecting any serialized term that references an atom not already known to the BEAM runtime. -
Increase Atom Table Limit Temporarily: As a transient mitigation prior to patching, set
+t 2097152invm.argsto raise the atom threshold, although this only delays exhaustion. -
Restrict Read Privileges on _changes: Audit anonymous access to continuous changes feeds to ensure low-privilege actors cannot freely query change streams.