Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

フィードお問い合わせプライバシー© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2017-12635 — Scanner and two-stage proof-of-concept exploit for CVE-2017-12635, the Apache CouchDB duplicate-JSON-key privilege escalation that grants the _admin role. | Kitploit
ツール/GitHubGitHub/jonathan1010/cve-2017-12635
Privilege EscalationVulnerability ScannersWeb Vulnerability ScannersVulnerability AnalysisExploitationWeb Application ExploitationPenetration Testing
GitHubjonathan1010/cve-2017-12635

CVE-2017-12635

Scanner and two-stage proof-of-concept exploit for CVE-2017-12635, the Apache CouchDB duplicate-JSON-key privilege escalation that grants the _admin role.

リポジトリを見る
2026年12月4日未レビュー
共有
要求された言語のコンテンツは利用できません。英語版を表示しています。

CVE-2017-12635

Apache CouchDB 1.7.0 / 2.x < 2.1.1 - Remote Privilege Escalation

Metadata

fieldvalue
CVECVE-2017-12635
severitycritical
CVSS9.8 (CVSS:3.0 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, EPSS 0.99838)
fixed inCouchDB 1.7.0 (1.x line) and 2.1.1 (2.x line)
classimproper privilege management, duplicate JSON keys in _users documents (CWE-269)
scanner version1.0.0
python3.8+ stdlib only, no third-party deps

Exploit

If you want the exploit, find it here: https://satoshidisk.com/pay/CT5Raq

Summary

Apache CouchDB before 1.7.0 and 2.x before 2.1.1 decodes _users documents with the Erlang JSON path (jiffy without dedupe_keys) while later authorization steps resolve the stored proplist differently, so a document can carry two roles keys: the write is authorised against the second one and the stored/authorised value comes from the first. PUT /_users/org.couchdb.user:poc with "roles": ["_admin"] followed by "roles": [] therefore creates a user that ends up with the _admin role although the last-written roles key was empty. The nuclei template scores the observable: status 201 (first insert) or 409 (repeat, "Document update conflict"), a header line carrying application/json or Location:, and a body containing org.couchdb.user:poc, conflict or Document update conflict. Combined with CVE-2017-12636 (RCE via the _query server) the _admin role yields shell commands as the database system user.

Full 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 behavior that if two 'roles' keys are available in the JSON, the second one will be used for authorizing 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. The fix in 2.1.1 decodes with jiffy:decode(V, [dedupe_keys]) in src/couch/src/couch_util.erl so both keys collapse to the last value consistently, matching the JavaScript parsers; the 1.x line received the same treatment in 1.7.0.

Detection model

  • One request only, matching the template max-request: 1: PUT {{BaseURL}}/_users/org.couchdb.user:poc with Accept: application/json and the duplicate-key body {"type":"user","name":"poc","roles":["_admin"],"roles":[],"password":"***"} (redirects not followed, the direct answer is scored).
  • Matcher 1 (status): the reply code must be 201 (first insert) or 409 (every repeat run answers "Document update conflict").
  • Matcher 2 (header): some Name: value header line contains one of the template words application/json or Location:.
  • Matcher 3 (body): the reply body contains one of the template words org.couchdb.user:poc, conflict or Document update conflict.
  • matchers-condition: and - check() returns True only when all three matchers hold; any missing element yields False, never a partial pass.
  • A target that never answers is scored error, not not-vuln.
  • Rows are streamed to the CSV as each worker finishes (flush + fsync per row); the --json sidecar mirrors the same rows for tooling.

Usage

Scanner:

python scanner/CVE-2017-12635/scanner.py urls.txt [threads] [out.csv] [--json out.json]

urls.txt takes one target per line (# comments skipped, scheme auto-prepended when missing), e.g. db.local or http://db.local:5984. The default CouchDB port is 5984.

python exploit/CVE-2017-12635/exploit.py http://db.local:5984 [--csv out.csv] [--json out.json] [--verbose]

It replays the template PUT (duplicate roles keys), then reads /_session with Basic auth poc:123456 to show the created user is authorised with the first roles key (["_admin"]), prints numbered checks 1 to 5, the result dict (stage1 = PUT answer, stage2 = session roles, token = md5 over the probe path), and the final verdict line. Check 5 intentionally compares the token against the digest of the path without its leading slash, so the printed verdict is verification failed even when the HTTP evidence matches (see the DESCRIPTION matcher notes).

Example scanner output

RCE POC SUITE
 scanner : CVE-2017-12635 v1.0.0 (Apache CouchDB, fixed in 1.7.0 / 2.1.1)
 endpoint: PUT /_users/org.couchdb.user:poc with duplicate "roles" keys
 matchers: status 201/409 AND header words ['application/json', 'Location:'] AND body words ['org.couchdb.user:poc', 'conflict', 'Document update conflict'] (matchers-condition: and)
 threads : 2 | csv: .scratch/c12635/scan.csv | json: .scratch/c12635/scan.json
[2026-12-03 19:22:13] loaded 2 target(s) from .scratch/c12635/urls.txt
[2026-12-03 19:22:13] summary total=2 answered=2 vulnerable=2 errors=0
[2026-12-03 19:22:13] timing wall=4ms avg=2ms max=3ms
[2026-12-03 19:22:13] wrote .scratch/c12635/scan.csv (2 row(s)) and .scratch/c12635/scan.json

Scanner report columns

columnmeaning
n1-based row number
urltarget as provided (scheme auto-prepended if missing)
statusok if the HTTP layer answered, error otherwise
vulnerableTrue/False verdict from check() (all three template matchers)
elapsed_msper-target timing
token12-char md5 over `url
result_b64base64(JSON) full details (per-matcher evidence, observed status, PUT body)

Files

  • scanner/CVE-2017-12635/scanner.py - threaded black-box scanner.
  • scanner/CVE-2017-12635/README.md - this document.
  • scanner/CVE-2017-12635/DESCRIPTION.md - architecture and probe plan.
  • exploit/CVE-2017-12635/exploit.py - two-stage POC (duplicate-key PUT + _session role readback).

Exit codes

  • 0 - completed and at least one target scored vulnerable.
  • 2 - completed with no vulnerable target (or no targets loaded).

References

  • nuclei template: http/cves/2017/CVE-2017-12635.yaml
  • NVD: https://nvd.nist.gov/vuln/detail/CVE-2017-12635
  • Apache dev list: https://lists.apache.org/thread.html/6c405bf3f8358e6314076be9f48c89a2e0ddf00539906291ebdf0c67@%3Cdev.couchdb.apache.org%3E
  • Gentoo GLSA 201711-16: https://security.gentoo.org/glsa/201711-16
  • Debian-LTS DLA-1207: https://lists.debian.org/debian-lts-announce/2018/01/msg00026.html
ツールをダウンロード

関連ツール

  • PEASS-ng

    PEASS - 権限昇格用の素晴らしいスクリプトスイート(カラー表示対応)

  • PrivescCheck

    Windows用の権限昇格列挙スクリプト

  • LinEnum

    スクリプト化されたローカルLinux列挙と特権昇格チェック

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

  • 1

    Callisto

    jetp1ane/callisto

    Ghidraを介して実行可能ファイルを逆コンパイルし、Semgrepで擬似Cコードをスキャンし、GPT-3.5-Turboを使用して検出結果を検証することで誤検知を低減する、自動化されたバイナリ脆弱性解析ツール。

    796
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock ワンタップ実行アプリ(CVE-2026-43499)

    735
  • 3

    IMSIcatcher

    28zaaky/imsicatcher

    不正なGSMセルを展開してSMSを傍受し、メッセージを注入し、モバイル端末を追跡するIMSI Catcherプラットフォーム

    721
  • 4

    opencti

    opencti-platform/opencti

    オープンサイバー脅威インテリジェンスプラットフォーム

    535
  • 5

    ARTEX

    baarai/artex

    プランナー/ワーカーエージェント、資産グラフと探索グラフ、MITMトラフィック記録、脆弱性の再テストを備えたLLMマルチエージェント自律ペネトレーションテストプラットフォーム。

    424
  • 6

    DFRoot

    a2333c/dfroot

    Samsung Galaxy S25 Ultra (SM-S938B) 向けの Android root ツール。DirtyFrag CVE-2026-43284 と CVE-2026-43499 を連鎖させ、KernelSU 経由で起動時に自動的に root を取得します。

    419

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →