{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2017-12635 exists.","fix":"Upgrade to a fixed version.","what":"CVE-2017-12635 is a critical vulnerability in Apache CouchDB, published on 14 Nov 2017. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2017-12635 and fix it if it is affected.\n\nWhat it is: CVE-2017-12635 is a critical vulnerability in Apache CouchDB, published on 14 Nov 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2017-12635 exists.\n\nAffected product: Apache CouchDB. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2017-12635/ (Markdown: https://insights.sbomify.com/CVE-2017-12635/index.md)","id":"CVE-2017-12635","markdown":"https://insights.sbomify.com/CVE-2017-12635/index.md","name":"CVE-2017-12635","record":{"aliases":["GHSA-f3p2-qqmm-jg8f","UBUNTU-CVE-2017-12635"],"analysis":{"component_type":"database","fix_type":"upgrade","impacts":["privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Apache CouchDB","requires_auth":"none","summary":"Non-admin users can escalate to admin privileges by exploiting JSON parser differences in Apache CouchDB, potentially leading to full system compromise.","user_interaction":"not_required","vuln_class":"privilege_escalation"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"apache","cpe":[{"product":"couchdb","vendor":"apache"}],"cvss":{"score":9.8,"severity":"critical","source":"nvd","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-269","name":"Improper Privilege Management"}],"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.","ecosystems":[],"exploits":{"exploitdb":3,"first_seen":"2016-04-06","github_poc":5,"max_poc_stars":10,"metasploit":2,"nuclei":1,"refs":[{"date":"2019-11-07T20:02:31Z","kind":"github_poc","ref":"https://github.com/assalielmehdi/CVE-2017-12635","stars":10,"title":"Case study and POC of CVE-2017-12635: Apache CouchDB 1.7.0 / 2.x \u003c 2.1.1 - Remote Privilege Escalation"},{"date":"2020-06-19T20:48:28Z","kind":"github_poc","ref":"https://github.com/cyberharsh/Apache-couchdb-CVE-2017-12635","stars":1,"title":null},{"date":"2016-04-06","kind":"metasploit","ref":"exploit/linux/http/apache_couchdb_cmd_exec","stars":null,"title":"Apache CouchDB Arbitrary Command Execution"},{"date":"2018-04-23","kind":"exploitdb","ref":"44498","stars":null,"title":"Apache CouchDB 1.7.0 / 2.x \u003c 2.1.1 - Remote Privilege Escalation"},{"date":"2018-07-13","kind":"exploitdb","ref":"45019","stars":null,"title":"Apache CouchDB - Arbitrary Command Execution (Metasploit)"},{"date":"2018-07-13","kind":"exploitdb","ref":"45019","stars":null,"title":"Apache CouchDB - Arbitrary Command Execution (Metasploit)"},{"date":"2026-05-29T19:32:11Z","kind":"github_poc","ref":"https://github.com/Dungsocool/CVE-2017-12635_36","stars":0,"title":null},{"date":"2026-08-03T13:51:39Z","kind":"github_poc","ref":"https://github.com/Darabium/couchdb-exploit","stars":0,"title":"This tool exploits two critical vulnerabilities in Apache CouchDB:  | CVE | Description | Severity | |-----|-------------|----------| | **CVE-2017-12635** | Privilege Escalation via JSON Parsing Bypass | 🔴 Critical | | **CVE-2017-12636** | Remote Code Execution via Query Server | 🔴 Critical |"}],"tier":"weaponised"},"has_fix":true,"headline":"Privilege escalation in Apache CouchDB","id":"CVE-2017-12635","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"privilege_escalation","year":"2017"},"n_packages":0,"n_references":7,"next":{"headline":"Command injection in Apache CouchDB","id":"CVE-2017-12636"},"packages":[],"prev":{"headline":"Camel-castor component in Apache Camel is vulnerable to Java object de-serialisation","id":"CVE-2017-12634"},"products":["Apache CouchDB"],"published":"2017-11-14","related":[{"cvss_score":9.8,"headline":"Apache CouchDB Insecure Default Initialization of Resource","id":"CVE-2022-24706","kev_date_added":"2022-08-25","published":"2022-04-26"},{"cvss_score":9.8,"headline":"Auth bypass in Apache CouchDB","id":"CVE-2020-1955","kev_date_added":null,"published":"2020-05-20"},{"cvss_score":7.8,"headline":"Code injection in n/a","id":"CVE-2018-14889","kev_date_added":null,"published":"2018-09-21"},{"cvss_score":7.8,"headline":"Privilege escalation in Apache CouchDB","id":"CVE-2016-8742","kev_date_added":null,"published":"2018-02-12"},{"cvss_score":7.3,"headline":"Privilege escalation vulnerability when using HTML attachments","id":"CVE-2021-38295","kev_date_added":null,"published":"2021-10-14"},{"cvss_score":7.2,"headline":"Code injection in Apache CouchDB","id":"CVE-2018-17188","kev_date_added":null,"published":"2019-01-02"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-09-17","vendors":["Apache Software Foundation"]},"summary":"Non-admin users can escalate to admin privileges by exploiting JSON parser differences in Apache CouchDB, potentially leading to full system compromise.","url":"https://insights.sbomify.com/CVE-2017-12635/"}