Moderate severity vulnerability that affects org.apache.karaf:apache-karaf and org.apache.karaf:karaf
Apache Karaf
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.apache.karaf:karaf Maven |
|
|
| org.apache.karaf:apache-karaf Maven |
|
|
Apache Karaf
| Product | Affected | Fixed in |
|---|---|---|
| org.apache.karaf:karaf Maven |
|
|
| org.apache.karaf:apache-karaf Maven |
|
|
Apache Karaf kar deployer reads .kar archives and extracts the paths from the "repository/" and "resources/" entries in the zip file. It then writes out the content of these paths to the Karaf repo and resources directories. However, it doesn't do any validation on the paths in the zip file. This means that a malicious user could craft a .kar file with ".." directory names and break out of the directories to write arbitrary content to the filesystem. This is the "Zip-slip" vulnerability - https://snyk.io/research/zip-slip-vulnerability. This vulnerability is low if the Karaf process user has limited permission on the filesystem. Any Apache Karaf releases prior 4.2.3 is impacted.
From the CVE record · apache
Apache Karaf releases before 4.2.3 do not validate paths when extracting .kar archives. If a malicious .kar file is deployed, its entries can escape the intended directories and write files wherever the Karaf process has permission.
Anyone running Apache Karaf or using the Maven packages org.apache.karaf:karaf or org.apache.karaf:apache-karaf at versions before 4.2.3 should check their deployment.