CVE-2017-12635

CRITICAL EXPLOITED IN THE WILD NUCLEI LAB

Apache CouchDB 1.7.0 / 2.x < 2.1.1 - Remote Privilege Escalation

Title source: nuclei

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.

Exploits (6)

exploitdb WORKING POC VERIFIED
by Metasploit · rubyremotelinux
https://www.exploit-db.com/exploits/45019
exploitdb WORKING POC
by r4wd3r · pythonwebappslinux
https://www.exploit-db.com/exploits/44498
nomisec WORKING POC 10 stars
by assalielmehdi · poc
https://github.com/assalielmehdi/CVE-2017-12635
nomisec WORKING POC 1 stars
by cyberharsh · poc
https://github.com/cyberharsh/Apache-couchdb-CVE-2017-12635
metasploit SCANNER
by Max Justicz · rubypoc
https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/couchdb/couchdb_enum.rb
metasploit WORKING POC EXCELLENT
by Max Justicz, Joan Touzet · rubypoclinux
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb

Nuclei Templates (1)

Apache CouchDB 1.7.0 / 2.x < 2.1.1 - Remote Privilege Escalation
CRITICALby pikpikcu
Shodan: product:"couchdb" || cpe:"cpe:2.3:a:apache:couchdb"

Scores

CVSS v3 9.8
EPSS 0.9410
EPSS Percentile 99.9%
Attack Vector NETWORK
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Details

VulnCheck KEV 2023-11-17
InTheWild.io 2017-01-12
CWE
CWE-269
Status published
Products (4)
apache/couchdb 2.0.0 (5 CPE variants)
apache/couchdb < 1.7.0
Apache Software Foundation/Apache CouchDB 1.2.0 to 1.6.1
Apache Software Foundation/Apache CouchDB 2.0.0 to 2.1.0
Published Nov 14, 2017
Tracked Since Feb 18, 2026