Permissions, Privileges, and Access Controls in CouchDB - CVE-2017-12635
Published: January 30, 2019 / Updated: October 30, 2024
Vulnerability details
The vulnerability allows a remote attacker to escalate privileges on the system.
The vulnerability exists due differences in the Erlang-based JSON parser and JavaScript-based JSON parser that can lead to submitting "_users" documents with duplicate keys for "roles" used for access control within the database, including the "_admin" role. A remote authenticated user can create a specially crafted document and abuse the JSON parser differences result in behavior for two 'roles' keys within a single document and gain administrative privileges within the database.
Affected software
Arch Linux
Gentoo Linux
Fedora
erlang-jiffy
couchdb
How to mitigate CVE-2017-12635
erlang-jiffy - addressed in versions 0.14.13-1.fc26, 0.14.13-1.fc27
couchdb - addressed in versions 1.7.1-3.fc26, 1.7.1-3.fc27
Links to Public Exploits and PoC-codes
- Exploit #10783 - CVE-2017-12635-EXP (CouchDB CVE-2017-12635 Exploit Script) (October 30, 2024)
- Exploit #6296 - Apache CouchDB - Arbitrary Command Execution (Metasploit) (June 17, 2021)
- Exploit #6217 - Apache CouchDB 1.7.0 and 2.x before 2.1.1 - Remote Privilege Escalation (June 17, 2021)
- Exploit #6195 - Apache CouchDB < 2.1.0 - Remote Code Execution (June 17, 2021)
- Exploit #230 - CVEexploits (Writing Exploits for some common vulnerabilities and exposures ) (March 18, 2020)
- Exploit #1843 - Apache CouchDB Arbitrary Command Execution (March 18, 2020)
External References
- http://www.securityfocus.com/bid/101868
- https://lists.apache.org/thread.html/6c405bf3f8358e6314076be9f48c89a2e0ddf00539906291ebdf0c67@%3Cdev.couchdb.apache.org%3E
- https://lists.debian.org/debian-lts-announce/2018/01/msg00026.html
- https://security.gentoo.org/glsa/201711-16
- https://www.exploit-db.com/exploits/44498/
- https://www.exploit-db.com/exploits/45019/