<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Cpe:2.3:a:apache:couchdb:2.0.0:*:*:*:*:*:*:* — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/cpes/cpe2.3aapachecouchdb2.0.0/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 29 May 2026 20:02:07 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/cpes/cpe2.3aapachecouchdb2.0.0/feed.xml" rel="self" type="application/rss+xml"/><item><title>Apache CouchDB Improper Privilege Management Leads to Remote Code Execution</title><link>https://feed.craftedsignal.io/briefs/2026-05-couchdb-privesc-rce/</link><pubDate>Fri, 29 May 2026 20:02:07 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-couchdb-privesc-rce/</guid><description>A public exploit demonstrates improper privilege management in Apache CouchDB (CVE-2017-12635) leading to privilege escalation, which can be combined with CVE-2017-12636 for remote code execution by modifying server configurations via the HTTP API.</description><content:encoded><![CDATA[<p>A public exploit has surfaced detailing a critical vulnerability in Apache CouchDB version 1.6.0. This exploit leverages CVE-2017-12635, an improper privilege management flaw, enabling an attacker to gain administrative privileges. By exploiting inconsistent handling of duplicate JSON <code>roles</code> keys, a malicious actor can create a new user with administrator rights. This privilege escalation serves as a stepping stone to CVE-2017-12636, which allows remote code execution by modifying CouchDB&rsquo;s configuration via the HTTP API. The vulnerability is triggered when CouchDB versions prior to 1.7.1 process design functions that declare a &ldquo;language&rdquo; field. Successful exploitation can lead to complete system compromise as the attacker gains the ability to execute arbitrary commands on the server.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker probes the target CouchDB instance, identifying version 1.6.0 running on port 5984.</li>
<li>The attacker exploits CVE-2017-12635 by sending a crafted HTTP PUT request to the <code>/_users</code> endpoint with a JSON payload containing duplicate &ldquo;roles&rdquo; keys. The first &ldquo;roles&rdquo; key grants admin privileges, while the second bypasses validation.</li>
<li>A new user account, such as &ldquo;hacker&rdquo;, is created with administrative privileges due to the vulnerability in JSON parsing.</li>
<li>The attacker authenticates to the CouchDB instance using the newly created admin account.</li>
<li>The attacker exploits CVE-2017-12636 by sending an HTTP PUT request to the <code>/_config/query_servers/cmd</code> endpoint, setting the value to an OS command (e.g., &ldquo;id 1&gt;/tmp/pwned 2&gt;&amp;1&rdquo;).</li>
<li>The attacker creates a new database (e.g., &ldquo;rcetest&rdquo;) and a design document with a view using the &ldquo;cmd&rdquo; language.</li>
<li>The attacker triggers the view by sending an HTTP GET request to the <code>/rcetest/_design/rce/_view/myview</code> endpoint.</li>
<li>CouchDB executes the configured OS command under the privileges of the CouchDB process (couchdb user), achieving remote code execution.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to gain full control of the CouchDB instance. This includes the ability to read, modify, and delete sensitive data stored within the databases. Furthermore, by leveraging remote code execution (CVE-2017-12636), attackers can execute arbitrary commands on the server with the privileges of the CouchDB process. While the exploit described in the source material shows code execution with the privileges of the &ldquo;couchdb&rdquo; user (uid=1000), it remains sufficient to achieve Remote Code Execution within the boundaries of the service permissions and further compromise the host system.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Immediately upgrade Apache CouchDB to a secure version (≥ 1.7.1 or ≥ 2.1.1, recommended version 3.x) to patch CVE-2017-12635 and CVE-2017-12636.</li>
<li>Configure <code>require_valid_user = true</code> in the <code>local.ini</code> configuration file to block all anonymous API access, mitigating CVE-2017-12635.</li>
<li>Implement network segmentation to restrict access to port 5984 (CouchDB HTTP API) to only trusted IPs.</li>
<li>Use <code>config_whitelist</code> in the <code>local.ini</code> file to restrict which configuration keys can be modified via the API, preventing attackers from leveraging the <code>/_config/query_servers</code> endpoint to inject OS commands, addressing CVE-2017-12636.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>privilege-escalation</category><category>remote-code-execution</category><category>couchdb</category><category>CVE-2017-12635</category><category>CVE-2017-12636</category></item></channel></rss>