Skip to main content
← All vulnerabilities
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 b

Published
Last modified
published
Not listed in CISA KEV
3 on Exploit-DB, 2 Metasploit modules, 5 proofs of concept on GitHub, 1 Nuclei template

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.

Timeline

  1. CVE published
  2. Public exploit on Exploit-DB

    EDB-44498, EDB-45019, EDB-45019

  3. Record last updated
  4. EPSS reached 10%

    FIRST estimates at least a 10% chance of exploitation in the next 30 days

Affected versions

  • Apache Software Foundation Apache CouchDB

    1.2.0 to 1.6.1, 2.0.0 to 2.1.0

References 17

Exploit-DB

lists.apache.org

security.gentoo.org

lists.debian.org

securityfocus.com

support.hpe.com

GitHub · rapid7/metasploit-framework

GitHub · projectdiscovery/nuclei-templates

GitHub · CyberCTF/vulhub-couchdb-cve-2017-12635

GitHub · Darabium/couchdb-exploit

GitHub · Dungsocool/CVE-2017-12635_36

GitHub · assalielmehdi/CVE-2017-12635

GitHub · cyberharsh/Apache-couchdb-CVE-2017-12635