Vulnerability Details : CVE-2017-12635
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.
Vulnerability category: Execute code
At least one public exploit which can be used to exploit this vulnerability exists!
Exploit prediction scoring system (EPSS) score for CVE-2017-12635
Probability of exploitation activity in the next 30 days: 97.53%
Percentile, the proportion of vulnerabilities that are scored at or less: ~ 100 % EPSS Score History EPSS FAQ
Metasploit modules for CVE-2017-12635
-
Apache CouchDB Arbitrary Command Execution
Disclosure Date : 2016-04-06exploit/linux/http/apache_couchdb_cmd_execCouchDB administrative users can configure the database server via HTTP(S). Some of the configuration options include paths for operating system-level binaries that are subsequently launched by CouchDB. This allows an admin user in Apache CouchDB before 1.7.0 and 2.x before 2.1.1 to execute arbitrary shell commands as the CouchDB user, including downloading and executing scripts from the public internet. Authors: - Max Justicz - Joan Touzet - Green-m <[email protected]> -
CouchDB Enum Utility
auxiliary/scanner/couchdb/couchdb_enumThis module enumerates databases on CouchDB using the REST API (without authentication by default). Authors: - Max Justicz - Roberto Soares Espreto <[email protected]> - Hendrik Van Belleghem - Green-m <[email protected]>
CVSS scores for CVE-2017-12635
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Source |
---|---|---|---|---|---|
10.0
|
HIGH | AV:N/AC:L/Au:N/C:C/I:C/A:C |
10.0
|
10.0
|
[email protected] |
9.8
|
CRITICAL | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
3.9
|
5.9
|
[email protected] |
CWE ids for CVE-2017-12635
-
The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.Assigned by: [email protected] (Primary)
References for CVE-2017-12635
- https://support.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbmu03935en_us
-
https://www.exploit-db.com/exploits/44498/
-
https://lists.apache.org/thread.html/6c405bf3f8358e6314076be9f48c89a2e0ddf00539906291ebdf0c67@%3Cdev.couchdb.apache.org%3E
Mailing List;Vendor Advisory
-
https://security.gentoo.org/glsa/201711-16
Third Party Advisory
-
http://www.securityfocus.com/bid/101868
Third Party Advisory;VDB Entry
- https://www.exploit-db.com/exploits/45019/
- https://lists.debian.org/debian-lts-announce/2018/01/msg00026.html
Products affected by CVE-2017-12635
- cpe:2.3:a:apache:couchdb:*:*:*:*:*:*:*:*
- cpe:2.3:a:apache:couchdb:2.0.0:*:*:*:*:*:*:*
- cpe:2.3:a:apache:couchdb:2.0.0:rc3:*:*:*:*:*:*
- cpe:2.3:a:apache:couchdb:2.0.0:rc4:*:*:*:*:*:*
- cpe:2.3:a:apache:couchdb:2.0.0:rc1:*:*:*:*:*:*
- cpe:2.3:a:apache:couchdb:2.0.0:rc2:*:*:*:*:*:*