yahoo / egads

A Java package to automatically detect anomalies in large scale time-series data
Other
1.17k stars 331 forks source link

[Security] Java (Maven): Use of insecure protocol to download/upload artifacts #68

Open whmcsmoney opened 4 years ago

whmcsmoney commented 4 years ago

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 Locations :

https://github.com/yahoo/egads/blob/f14b898e3d343c2bc0318572e2c348aa9970ae74/pom.xml

  <pluginRepositories>
    <pluginRepository>
      <id>bintray-yahoo-maven</id>
      <name>bintray-plugins</name>
      <url>http://yahoo.bintray.com/maven</url>
    </pluginRepository>
  </pluginRepositories>

References :

  1. https://serverfault.com/a/153065
  2. https://security.stackexchange.com/a/12050
  3. https://thenextweb.com/insights/2017/12/11/comcast-continues-to-inject-its-own-code-into-websites-you-visit/#
  4. https://medium.com/bugbountywriteup/want-to-take-over-the-java-ecosystem-all-you-need-is-a-mitm-1fc329d898fb
  5. https://github.com/Semmle/ql/pull/2413
  6. https://github.com/advisories/GHSA-rcj2-vvjx-87pm
  7. https://github.com/advisories/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