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.

عرض المستودع
4 ديسمبر 2026لم تتم المراجعة بعد
مشاركة
المحتوى غير متوفر باللغة المطلوبة. عرض النسخة الإنجليزية.

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

    نص برمجي لتصعيد الامتيازات واستكشاف النظام لنظام ويندوز

  • LinEnum

    فحوصات نصية للتعداد المحلي ورفع الصلاحيات لنظام Linux

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

  • 1

    Callisto

    jetp1ane/callisto

    أداة تحليل ثغرات ثنائية آلية تقوم بفك ترجمة الملفات التنفيذية عبر Ghidra، ومسح كود شبه-C باستخدام Semgrep، والتحقق من النتائج باستخدام GPT-3.5-Turbo لتقليل الإيجابيات الكاذبة.

    796
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # تطبيق GhostLock للتنفيذ بنقرة واحدة (CVE-2026-43499)

    735
  • 3

    IMSIcatcher

    28zaaky/imsicatcher

    منصة IMSI Catcher تنشر خلية GSM مارقة لاعتراض الرسائل النصية القصيرة وحقن الرسائل وتتبع الأجهزة المحمولة

    721
  • 4

    opencti

    opencti-platform/opencti

    منصة مفتوحة لاستخبارات التهديدات السيبرانية

    535
  • 5

    ARTEX

    baarai/artex

    منصة اختبار اختراق مستقلة متعددة الوكلاء تعتمد على LLM، مع وكلاء تخطيط وتنفيذ، ومخططات للأصول والاستكشاف، وتسجيل حركة مرور MITM، وإعادة اختبار الثغرات.

    424
  • 6

    DFRoot

    a2333c/dfroot

    أداة root لنظام Android لهاتف Samsung Galaxy S25 Ultra (SM-S938B) تقوم بتسلسل DirtyFrag CVE-2026-43284 وCVE-2026-43499 للحصول على صلاحيات root تلقائيًا عند الإقلاع عبر KernelSU.

    419

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →