[Security] Java (Maven): Use of insecure protocol to download/upload artifacts
whmcsmoney opened this issue · 0 comments
Hi Security Team,
The build files indicate that this project is resolving dependencies over HTTP instead of HTTPS. Any of these artifacts could have been MITM to maliciously compromise them and infect the build artifacts that were produced. Additionally, if any of these JARs or other dependencies were compromised, any developers using these could continue to be infected past updating to fix this.
Description:
This attack leverages the build infrastructure loading dependencies over HTTP without any other sort of integrity check to allow them to be maliciously compromised.
POC code has existed since 2014 to maliciously compromise a JAR file inflight.
See:
https://max.computer/blog/how-to-take-over-the-computer-of-any-java-or-clojure-or-scala-developer/
https://github.com/mveytsman/dilettante
Source Location
https://github.com/yahoo/sherlock/blob/5d1bf481255eda73837a2f61f2b72e4d704c822a/pom.xml
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-yahoo-maven</id>
<name>bintray</name>
<url>http://yahoo.bintray.com/maven</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>bintray-yahoo-maven</id>
<name>bintray-plugins</name>
<url>http://yahoo.bintray.com/maven</url>
</pluginRepository>
</pluginRepositories>
References :
- https://serverfault.com/a/153065
- https://security.stackexchange.com/a/12050
- https://thenextweb.com/insights/2017/12/11/comcast-continues-to-inject-its-own-code-into-websites-you-visit/#
- https://medium.com/bugbountywriteup/want-to-take-over-the-java-ecosystem-all-you-need-is-a-mitm-1fc329d898fb
- github/codeql#2413
- GHSA-rcj2-vvjx-87pm
- GHSA-jwqm-c9f2-2cq3
This vulnerability has a CVSS v3.0 Base Score of 8.1/10
https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H