CVE-2017-12635 in the critical feed json
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…
published 8y ago modified 4mo ago also EUVD-2017-4174
- cvss
- 9.8
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 99.8%
- EPSS 99.8% chance of exploitation in 30 days, percentile 99.9%
- public exploits
- 4
- Metasploit and Exploit-DB, plus a Nuclei check
Summary
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.
Patch / fix
Is CVE-2017-12635 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2017-12635 updated cvss 6.5
couchdb: Privilege escalation via _users documents with duplicate keys for 'roles'
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Timeline
- First public exploit (Metasploit exploit/linux/http/apache_couchdb_cmd_exec)
- Published
Exploit prediction
99.84% chance of exploitation in the next 30 days, higher than 99.9% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- Metasploit exploit/linux/http/apache_couchdb_cmd_exec Apache CouchDB Arbitrary Command Execution metasploit exploit, excellent rank, 2016-04-06
- Metasploit auxiliary/scanner/couchdb/couchdb_enum CouchDB Enum Utility metasploit auxiliary, normal rank
- EDB-45019 Apache CouchDB - Arbitrary Command Execution (Metasploit) remote, 2018-07-13
- EDB-44498 Apache CouchDB 1.7.0 / 2.x < 2.1.1 - Remote Privilege Escalation webapps, 2018-04-23
- Nuclei template Apache CouchDB 1.7.0 / 2.x < 2.1.1 - Remote Privilege Escalation nuclei detection template
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 9.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 10.0 | AV:N/AC:L/Au:N/C:C/I:C/A:C |
Affected products
- Apache Software Foundation Apache CouchDB
Classification
- Weakness
-
- CWE-269 Improper Privilege Management
References
-
exploit-db.com
/exploits/44498/
exploit
-
exploit-db.com
/exploits/45019/
exploit
-
security.gentoo.org
/glsa/201711-16
vendor-advisory, third-party-advisory
-
lists.apache.org
/thread.html/6c405bf3f8358e6314076be9f48c89a2e0ddf00539906291ebdf0c67%40%3Cdev.couchdb.apache.org%3E
mailing-list
-
lists.debian.org
/debian-lts-announce/2018/01/msg00026.html
mailing-list
-
securityfocus.com
/bid/101868
vdb-entry, third-party-advisory
- support.hpe.com /hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbmu03935en_us
Sources
- CVE List CVE-2017-12635
- NVD CVE-2017-12635
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.