Skip to content

Commit 3fc2c02

Browse files
committed
Fixed status reporting bug for log4j1 and logback. v2.5.3
1 parent a373a57 commit 3fc2c02

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
log4j2-scan is a single binary command-line tool for CVE-2021-44228 vulnerability scanning and mitigation patch. It also supports nested JAR file scanning and patch. It also detects CVE-2021-45046 (log4j 2.15.0), CVE-2021-45105 (log4j 2.16.0), CVE-2021-4104 (log4j 1.x), and CVE-2021-42550 (logback 0.9-1.2.7) vulnerabilities.
44

55
### Download
6-
* [log4j2-scan 2.5.2 (Windows x64, 7z)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.2/logpresso-log4j2-scan-2.5.2-win64.7z)
7-
* [log4j2-scan 2.5.2 (Windows x64, zip)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.2/logpresso-log4j2-scan-2.5.2-win64.zip)
6+
* [log4j2-scan 2.5.3 (Windows x64, 7z)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.3/logpresso-log4j2-scan-2.5.3-win64.7z)
7+
* [log4j2-scan 2.5.3 (Windows x64, zip)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.3/logpresso-log4j2-scan-2.5.3-win64.zip)
88
* If you get `VCRUNTIME140.dll not found` error, install [Visual C++ Redistributable](https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170).
99
* If native executable doesn't work, use the JAR instead. 32bit is not supported.
1010
* 7zip is available from www.7zip.org, and is open source and free.
11-
* [log4j2-scan 2.5.2 (Linux x64)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.2/logpresso-log4j2-scan-2.5.2-linux.tar.gz)
12-
* [log4j2-scan 2.5.2 (Linux aarch64)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.2/logpresso-log4j2-scan-2.5.2-linux-aarch64.tar.gz)
11+
* [log4j2-scan 2.5.3 (Linux x64)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.3/logpresso-log4j2-scan-2.5.3-linux.tar.gz)
12+
* [log4j2-scan 2.5.3 (Linux aarch64)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.3/logpresso-log4j2-scan-2.5.3-linux-aarch64.tar.gz)
1313
* If native executable doesn't work, use the JAR instead. 32bit is not supported.
14-
* [log4j2-scan 2.5.2 (Mac OS)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.2/logpresso-log4j2-scan-2.5.2-darwin.tar.gz)
15-
* [log4j2-scan 2.5.2 (Any OS, 20KB)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.2/logpresso-log4j2-scan-2.5.2.jar)
14+
* [log4j2-scan 2.5.3 (Mac OS)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.3/logpresso-log4j2-scan-2.5.3-darwin.tar.gz)
15+
* [log4j2-scan 2.5.3 (Any OS, 20KB)](https://github.com/logpresso/CVE-2021-44228-Scanner/releases/download/v2.5.3/logpresso-log4j2-scan-2.5.3.jar)
1616

1717
### Build
1818
* [How to build Native Image](https://github.com/logpresso/CVE-2021-44228-Scanner/wiki/FAQ#how-to-build-native-image)
@@ -22,7 +22,7 @@ Just run log4j2-scan.exe or log4j2-scan with target directory path. The logpress
2222

2323
Usage
2424
```
25-
Logpresso CVE-2021-44228 Vulnerability Scanner 2.5.2 (2021-12-21)
25+
Logpresso CVE-2021-44228 Vulnerability Scanner 2.5.3 (2021-12-21)
2626
Usage: log4j2-scan [--scan-log4j1] [--fix] target_path1 target_path2
2727
2828
-f [config_file_path]
@@ -104,7 +104,7 @@ On Linux
104104
```
105105
On UNIX (AIX, Solaris, and so on)
106106
```
107-
java -jar logpresso-log4j2-scan-2.5.2.jar [--fix] target_path
107+
java -jar logpresso-log4j2-scan-2.5.3.jar [--fix] target_path
108108
```
109109

110110
If you add `--fix` option, this program will copy vulnerable original JAR file to .bak file, and create new JAR file without `org/apache/logging/log4j/core/lookup/JndiLookup.class` entry. All .bak files are archived into the single zip file which is named by `log4j2_scan_backup_yyyyMMdd_HHmmss.zip`, then deleted safely. In most environments, JNDI lookup feature will not be used. However, you must use this option at your own risk. You can easily restore original vulnerable JAR files using `--restore` option.

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<modelVersion>4.0.0</modelVersion>
77
<groupId>com.logpresso</groupId>
88
<artifactId>log4j2-scanner</artifactId>
9-
<version>2.5.2</version>
9+
<version>2.5.3</version>
1010
<packaging>jar</packaging>
1111
<name>Logpresso Log4j2 Scanner</name>
1212

src/main/java/com/logpresso/scanner/Detector.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ private void printDetectionForLog4j1(File jarFile, List<String> pathChain, Strin
389389

390390
System.out.println(msg);
391391

392-
addReport(jarFile, pathChain, "Log4j 1", version, "CVE-2021-4104", false, true);
392+
addReport(jarFile, pathChain, "Log4j 1", version, "CVE-2021-4104", mitigated, true);
393393
}
394394

395395
private void printDetectionForLogback(File jarFile, List<String> pathChain, String version, boolean mitigated) {
@@ -403,7 +403,7 @@ private void printDetectionForLogback(File jarFile, List<String> pathChain, Stri
403403

404404
System.out.println(msg);
405405

406-
addReport(jarFile, pathChain, "Logback", version, "CVE-2021-42550", false, true);
406+
addReport(jarFile, pathChain, "Logback", version, "CVE-2021-42550", mitigated, true);
407407
}
408408

409409
public void addErrorReport(File jarFile, String error) {

src/main/java/com/logpresso/scanner/Log4j2Scanner.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import com.logpresso.scanner.utils.ZipUtils;
2424

2525
public class Log4j2Scanner {
26-
public static final String VERSION = "2.5.2";
27-
public static final String RELEASE_DATE = "2021-12-21";
26+
public static final String VERSION = "2.5.3";
27+
public static final String RELEASE_DATE = "2021-12-22";
2828
public static final String BANNER = "Logpresso CVE-2021-44228 Vulnerability Scanner " + VERSION + " (" + RELEASE_DATE + ")";
2929

3030
private static final boolean isWindows = File.separatorChar == '\\';

0 commit comments

Comments
 (0)