Vulnerability Name:

CVE-2017-12635

Assigned:2017-11-14
Published:2017-11-14
Updated:2018-07-27
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.
CVSS v3 Severity:9.8 Critical (CVSS v3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
8.5 High (Temporal CVSS v3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): High
Availibility (A): High
7.2 High (CCN CVSS v3 Vector: CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H)
6.3 Medium (CCN Temporal CVSS v3 Vector: CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): High
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): High
Availibility (A): High
CVSS v2 Severity:10.0 High (CVSS v2 Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Authentication (Au): None
Impact Metrics:Confidentiality (C): Complete
Integrity (I): Complete
Availibility (A): Complete
9.0 High (CCN CVSS v2 Vector: AV:N/AC:L/Au:S/C:C/I:C/A:C)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Athentication (Au): Single_Instance
Impact Metrics:Confidentiality (C): Complete
Integrity (I): Complete
Availibility (A): Complete
Vulnerability Type:CWE-264
References:Source: BID
Type: VENDOR_ADVISORY
101868

Source: XF
Type: UNKNOWN
apache-couchdb-cve201712635-priv-esc(135117)

Source: MLIST
Type: VENDOR_ADVISORY
[dev] 20171114 Apache CouchDB CVE-2017-12635 and CVE-2017-12636

Source: MLIST
Type: UNKNOWN
[debian-lts-announce] 20180121 [SECURITY] [DLA 1252-1] couchdb security update

Source: GENTOO
Type: VENDOR_ADVISORY
GLSA-201711-16

Source: EXPLOIT-DB
Type: UNKNOWN
44498

Source: EXPLOIT-DB
Type: UNKNOWN
45019

Vulnerable Configuration:Configuration 1:
  • cpe:/a:apache:couchdb:1.0.0:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:1.0.1:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:1.0.2:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:1.0.3:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:1.0.4:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:1.1.0:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:1.1.1:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:1.1.2:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:1.2.0:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:1.2.1:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:1.5.0:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:2.0.0:*:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:2.0.0:rc1:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:2.0.0:rc2:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:2.0.0:rc3:*:*:*:*:*:*
  • OR cpe:/a:apache:couchdb:2.0.0:rc4:*:*:*:*:*:*

  • * Denotes that component is vulnerable
    Oval Definitions
    Definition IDClassTitleLast Modified
    oval:com.ubuntu.xenial:def:201712635000
    V
    CVE-2017-12635 on Ubuntu 16.04 LTS (xenial) - untriaged.
    2017-11-14
    oval:com.ubuntu.trusty:def:201712635000
    V
    CVE-2017-12635 on Ubuntu 14.04 LTS (trusty) - untriaged.
    2017-11-14
    oval:com.ubuntu.artful:def:201712635000
    V
    CVE-2017-12635 on Ubuntu 17.10 (artful) - untriaged.
    2017-11-14
    BACK
    apache couchdb 1.0.0
    apache couchdb 1.0.1
    apache couchdb 1.0.2
    apache couchdb 1.0.3
    apache couchdb 1.0.4
    apache couchdb 1.1.0
    apache couchdb 1.1.1
    apache couchdb 1.1.2
    apache couchdb 1.2.0
    apache couchdb 1.2.1
    apache couchdb 1.5.0
    apache couchdb 2.0.0
    apache couchdb 2.0.0 rc1
    apache couchdb 2.0.0 rc2
    apache couchdb 2.0.0 rc3
    apache couchdb 2.0.0 rc4