{"id":"CVE-2017-12635","published":"2017-11-14T20:00:00Z","modified":"2024-09-17T01:31:53Z","title":"Due to differences in the Erlang-based JSON parser and JavaScript-based JSON parser, it is possible in Apache CouchDB…","vendor":"Apache Software Foundation","product":"Apache CouchDB","tier":"core","eol":null,"affectedVersions":[{"vendor":"Apache Software Foundation","product":"Apache CouchDB","versions":["1.2.0 to 1.6.1","2.0.0 to 2.1.0"]}],"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":null,"cvss":null,"epss":{"score":0.99838,"percentile":0.99961,"date":"2026-10-30","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2023-11-17","exploitedFirstSeen":"2023-11-17","ransomware":false,"evidence":[{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2023-11-17&host_type=src&vulnerability=cve-2017-12635","date":"2023-11-17"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2023-11-20&host_type=src&vulnerability=cve-2017-12635","date":"2023-11-20"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2023-11-21&host_type=src&vulnerability=cve-2017-12635","date":"2023-11-21"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2023-11-23&host_type=src&vulnerability=cve-2017-12635","date":"2023-11-23"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2023-11-24&host_type=src&vulnerability=cve-2017-12635","date":"2023-11-24"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2023-11-26&host_type=src&vulnerability=cve-2017-12635","date":"2023-11-26"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2023-11-27&host_type=src&vulnerability=cve-2017-12635","date":"2023-11-27"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2023-11-30&host_type=src&vulnerability=cve-2017-12635","date":"2023-11-30"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2023-12-01&host_type=src&vulnerability=cve-2017-12635","date":"2023-12-01"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2023-12-02&host_type=src&vulnerability=cve-2017-12635","date":"2023-12-02"}],"evidenceTotal":812,"provenance":"source"},"exploited":true,"otx":{"pulseCount":9,"pulses":[{"name":"invoke-mimikatz.hasthe.technology","url":"https://otx.alienvault.com/pulse/676af0f2663cdd2f25ed9e80","created":"2024-12-24"},{"name":"Vulnerabilities in Apache CouchDB Open the Door to Monero Miners","url":"https://otx.alienvault.com/pulse/65707ad2538285933007db2a","created":"2023-12-06"},{"name":"rogers","url":"https://otx.alienvault.com/pulse/64ab46ec79ba3a3f9f859541","created":"2023-07-09"},{"name":"rogers","url":"https://otx.alienvault.com/pulse/64ab412e96e4858e508978c7","created":"2023-07-09"},{"name":"Proof Point Emerging Exploit list","url":"https://otx.alienvault.com/pulse/6399fdc966948f6b537b9762","created":"2022-12-14"},{"name":"Log4j","url":"https://otx.alienvault.com/pulse/61df005d9f0ff216afd15bdc","created":"2022-01-12"},{"name":"Ransomware: Night Sky","url":"https://otx.alienvault.com/pulse/61deff0101737ee62817cbd7","created":"2022-01-12"},{"name":"Linux Servers Compromised to run CryptoCurrency Miners","url":"https://otx.alienvault.com/pulse/5b684817e47bd1512924817e","created":"2018-08-06"},{"name":"Vulnerabilities in Apache CouchDB Open the Door to Monero Miners","url":"https://otx.alienvault.com/pulse/5a8590085303276b6e113438","created":"2018-02-15"}],"provenance":"machine"},"cwes":[],"references":[{"url":"https://www.exploit-db.com/exploits/44498/","tags":["exploit","x_refsource_EXPLOIT-DB"]},{"url":"https://www.exploit-db.com/exploits/45019/","tags":["exploit","x_refsource_EXPLOIT-DB"]},{"url":"https://lists.apache.org/thread.html/6c405bf3f8358e6314076be9f48c89a2e0ddf00539906291ebdf0c67%40%3Cdev.couchdb.apache.org%3E","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://security.gentoo.org/glsa/201711-16","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/01/msg00026.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"http://www.securityfocus.com/bid/101868","tags":["vdb-entry","x_refsource_BID"]},{"url":"https://support.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbmu03935en_us","tags":["x_refsource_CONFIRM"]}],"techniques":[],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2017-4174","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2017-4174","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[{"id":44498,"url":"https://www.exploit-db.com/exploits/44498","title":"Apache CouchDB 1.7.0 / 2.x < 2.1.1 - Remote Privilege Escalation","type":"webapps","platform":"linux","date":"2018-04-23","verified":false,"provenance":"source"},{"id":45019,"url":"https://www.exploit-db.com/exploits/45019","title":"Apache CouchDB - Arbitrary Command Execution (Metasploit)","type":"remote","platform":"linux","date":"2018-07-13","verified":true,"provenance":"source"},{"id":45019,"url":"https://www.exploit-db.com/exploits/45019","title":"Apache CouchDB - Arbitrary Command Execution (Metasploit)","type":"remote","platform":"linux","date":"2018-07-13","verified":true,"provenance":"source"}],"exploitSources":{"exploitdb":{"count":3,"earliest":"2018-04-23"},"pocGithub":{"count":4,"skipped":1,"earliest":"2019-11-07","earliestUrl":"https://github.com/assalielmehdi/CVE-2017-12635","repos":[{"name":"assalielmehdi/CVE-2017-12635","url":"https://github.com/assalielmehdi/CVE-2017-12635","stars":10,"created":"2019-11-07"},{"name":"cyberharsh/Apache-couchdb-CVE-2017-12635","url":"https://github.com/cyberharsh/Apache-couchdb-CVE-2017-12635","stars":1,"created":"2020-06-19"},{"name":"Darabium/couchdb-exploit","url":"https://github.com/Darabium/couchdb-exploit","stars":0,"created":"2026-08-03"},{"name":"CyberCTF/vulhub-couchdb-cve-2017-12635","url":"https://github.com/CyberCTF/vulhub-couchdb-cve-2017-12635","stars":0,"created":"2026-10-08"}]},"metasploit":[{"name":"Apache CouchDB Arbitrary Command Execution","module":"exploit/linux/http/apache_couchdb_cmd_exec","type":"exploit","disclosureDate":"2016-04-06","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb"},{"name":"CouchDB Enum Utility","module":"auxiliary/scanner/couchdb/couchdb_enum","type":"auxiliary","disclosureDate":null,"url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/couchdb/couchdb_enum.rb"}],"nuclei":[{"id":"CVE-2017-12635","name":"Apache CouchDB 1.7.0 / 2.x < 2.1.1 - Remote Privilege Escalation","severity":"critical","path":"http/cves/2017/CVE-2017-12635.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2017/CVE-2017-12635.yaml"}],"first":{"date":"2016-04-06","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb"},"provenance":"source"},"exploitRefs":["https://www.exploit-db.com/exploits/44498/","https://www.exploit-db.com/exploits/45019/"],"flow":[],"timeline":[{"date":"2016-04-06","kind":"exploit-public","label":"First public exploit: Metasploit; later: Exploit-DB 2018-04-23, PoC-in-GitHub 2019-11-07","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb","provenance":"source"},{"date":"2017-11-14","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2017-12635","provenance":"source"},{"date":"2023-11-17","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2023-11-17&host_type=src&vulnerability=cve-2017-12635","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":"Metasploit","daysToKev":null},"priority":{"score":62.3,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 1079 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.99,"detail":"percentile 0.9996"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"2 NVD references tagged Exploit; 3 Exploit-DB entries; 4 PoC-in-GitHub repos; 2 Metasploit modules; 1 nuclei template"},{"name":"Mentioned in OTX pulses","points":2.27,"detail":"9 pulses"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}