← Vulnerability feed

Vulnerability record · CVE-2017-12635 · published 14 November 2017

CVE-2017-12635: Apache CouchDB privilege escalation via duplicate JSON roles keys

Apache · Couchdb

Apache CouchDB before 1.7.0 and 2.x before 2.1.1 parses JSON differently in its Erlang and JavaScript layers, so a _users document containing duplicate 'roles' keys is authorized using the second key but stored using the first. This lets a non-admin user assign themselves the '_admin' role, and combined with CVE-2017-12636 it can lead to remote code execution as the database system user.

9.8 CVSS 3.0 Critical EPSS 100% · top 0.1% CWE-269 · Improper privilege management
9.8CVSS 3.0 base score, v2 10.0
100%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
14References
17 Jun 2026Last modified by NVD

Description

Due to differences in the Erlang-based JSON parser and JavaScript-based JSON parser, it is possible in Apache CouchDB before 1.7.0 and 2.x before 2.1.1 to submit _users documents with duplicate keys for 'roles' used for access control within the database, including the special case '_admin' role, that denotes administrative users. In combination with CVE-2017-12636 (Remote Code Execution), this can be used to give non-admin users access to arbitrary shell commands on the server as the database system user. The JSON parser differences result in behaviour that if two 'roles' keys are available in the JSON, the second one will be used for authorising the document write, but the first 'roles' key is used for subsequent authorization for the newly created user. By design, users can not assign themselves roles. The vulnerability allows non-admin users to give themselves admin privileges.

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 17 September 2026. Confidence: high.

critical priorityCVSS 9.8 with no privileges or interaction required, near-maximum EPSS, and public exploit code, and it chains to remote code execution.

What it is

Apache CouchDB before 1.7.0 and 2.x before 2.1.1 parses JSON differently in its Erlang and JavaScript layers, so a _users document containing duplicate 'roles' keys is authorized using the second key but stored using the first. This lets a non-admin user assign themselves the '_admin' role, and combined with CVE-2017-12636 it can lead to remote code execution as the database system user.

Impact

An attacker gains administrative privileges on the CouchDB instance, and when chained with CVE-2017-12636, arbitrary shell command execution as the database system user.

Attack surface

Reachable over the network via the CouchDB HTTP API by submitting a crafted _users document; the CVSS vector shows no privileges or user interaction required, though the description frames the actor as a non-admin user.

Exploitation

Not listed in CISA KEV, but EPSS is 0.99838 (99.96th percentile) and public Exploit-DB entries 44498 and 45019 exist, indicating mature public exploitation.

What to do

  • Upgrade Apache CouchDB to 1.7.0 or 2.1.1 or later, which fixes the parser discrepancy.
  • Restrict network access to the CouchDB HTTP API to trusted hosts only.
  • Audit _users documents for duplicate 'roles' keys or unexpected '_admin' assignments and remove them.
  • Apply the CVE-2017-12636 fix as well, since the two are commonly chained for code execution.

Detection

  • Monitor CouchDB logs and HTTP requests for PUT/POST to _users with duplicate 'roles' keys in the JSON body.
  • Alert on creation or modification of users holding the '_admin' role outside approved change windows.
  • Review _users database documents for anomalous role assignments and unexpected admin accounts.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2017-12635 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2022-24706Apache CouchDB default install allows unauthenticated admin accessApache CouchDB before 3.2.2 ships with an insecure default initialization that lets an unauthenticated attacker reach an improperly secured installat…KEVEPSS 93%analysed9.8CVE-2020-1955Apache couchdb missing authentication for critical function vulnerabilityCouchDB version 3.0.0 shipped with a new configuration setting that governs access control to the entire database server called `require_valid_user_e…EPSS 1.8%7.8CVE-2018-14889Apache couchdb improper input validation vulnerabilityCouchDB in Vectra Networks Cognito Brain and Sensor before 4.3 contains a local code execution vulnerability.EPSS 0.56%7.8CVE-2016-8742Apache couchdb permissions and access controls vulnerabilityThe Windows installer that the Apache CouchDB team provides was vulnerable to local privilege escalation. All files in the install inherit the file p…EPSS 2.0%7.3CVE-2021-38295Apache couchdb cross-site scripting vulnerabilityIn Apache CouchDB, a malicious user with permission to create documents in a database is able to attach a HTML attachment to a document. If a CouchDB…EPSS 2.5%7.2CVE-2018-17188Apache couchdb vulnerabilityPrior to CouchDB version 2.3.0, CouchDB allowed for runtime-configuration of key components of the database. In some cases, this lead to vulnerabilit…EPSS 3.2%7.2CVE-2018-11769Apache couchdb vulnerabilityCouchDB administrative users before 2.2.0 can configure the database server via HTTP(S). Due to insufficient validation of administrator-supplied con…EPSS 8.2%7.2CVE-2018-8007Apache couchdb improper input validation vulnerabilityApache CouchDB administrative users can configure the database server via HTTP(S). Due to insufficient validation of administrator-supplied configura…EPSS 12%

Source: NIST National Vulnerability Database (record CVE-2017-12635), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.