ID CVE-2017-12635
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.
References
Vulnerable Configurations
  • cpe:2.3:a:apache:couchdb:0.8.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:0.8.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:0.8.1:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:0.8.1:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:0.9.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:0.9.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:0.9.1:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:0.9.1:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:0.9.2:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:0.9.2:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:0.10.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:0.10.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:0.10.1:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:0.10.1:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:0.10.2:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:0.10.2:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:0.11.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:0.11.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:0.11.1:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:0.11.1:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:0.11.2:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:0.11.2:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.0.1:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.0.1:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.0.2:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.0.2:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.0.3:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.0.3:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.0.4:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.0.4:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.1.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.1.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.1.1:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.1.1:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.1.2:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.1.2:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.2.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.2.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.2.1:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.2.1:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.2.2:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.2.2:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.3.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.3.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.3.1:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.3.1:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.4.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.4.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.5.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.5.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.5.1:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.5.1:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.6.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.6.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:1.6.1:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:1.6.1:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:2.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:2.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:2.0.0:rc1:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:2.0.0:rc1:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:2.0.0:rc2:*:*:*:*:*:*
    cpe:2.3:a:apache:couchdb:2.0.0:rc2:*:*:*:*:*:*
  • cpe:2.3:a:apache:couchdb:2.0.0:rc3:*:*:*:*:*:*
    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:rc4:*:*:*:*:*:*
CVSS
Base: 10.0 (as of 03-10-2019 - 00:03)
Impact:
Exploitability:
CWE CWE-269
CAPEC
  • Restful Privilege Elevation
    Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
Access
VectorComplexityAuthentication
NETWORK LOW NONE
Impact
ConfidentialityIntegrityAvailability
COMPLETE COMPLETE COMPLETE
cvss-vector via4 AV:N/AC:L/Au:N/C:C/I:C/A:C
refmap via4
bid 101868
confirm https://support.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbmu03935en_us
exploit-db
  • 44498
  • 45019
gentoo GLSA-201711-16
mlist
  • [debian-lts-announce] 20180121 [SECURITY] [DLA 1252-1] couchdb security update
  • [dev] 20171114 Apache CouchDB CVE-2017-12635 and CVE-2017-12636
Last major update 03-10-2019 - 00:03
Published 14-11-2017 - 20:29
Back to Top