[SECURITY] HTTP Download of Dependencies
envgap__google__google-java-format-402
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
3717179583c59ae3cccbe4bd99bce2332b1ff554- Manifest
eclipse_plugin/pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
google/google-java-format #402 · read the original issue
This vulnerability was originally reported to the Google Security Team in this report on May 31, 2019. As of yet, it is still unpatched: https://issuetracker.google.com/issues/132071216 This disclosure is part of my research published here: [](https://medium.com/@jonathan.leitschuh/want-to-take-over-the-java-ecosystem-all-you-need-is-a-mitm-1fc329d898fb?source=friends_link&sk=3c99970c55a899ad9ef41f126efcde0e) [Want to take over the Java ecosystem? All you need is a MITM!](https://medium.com/@jonathan.leitschuh/want-to-take-over-the-java-ecosystem-all-you-need-is-a-mitm-1fc329d898fb?source=friends_link&sk=3c99970c55a899ad9ef41f126efcde0e) --- [CWE-829: Inclusion of Functionality from Untrusted Control Sphere](https://cwe.mitre.org/data/definitions/829.html) [CWE-494: Download of Code Without Integrity Check](https://cwe.mitre.org/data/definitions/494.html) 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. 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 ### This isn't just theoretical 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 ### MITM Attacks Increasingly Common See: * https://serverfault.com/a/153065 * https://security.stackexchange.com/a/12050 * [Comcast continues to inject its own code into websites you visit](https://thenextweb.com/insights/2017/12/11/comcast-continues-to-inject-its-own-code-into-websites-you-visit/#) (over HTTP) ### Source Locations - https://github.com/google/google-java-format/blob/05df9d3b5c10f2bdd434181b6f046309a1040a37/eclipse_plugin/pom.xml#L43 ### Public Disclosure #### Option 1: File for a CVE A project maintainer for this project should probably file for a CVE number to inform the public about this vulnerability in the build for this project. The goal is to inform the public that there was a potential for published build artifacts to have been maliciously compromised in earlier releases. If a maintainer on this project works for or is associated with a CNA, please have them file it with them: [cve.mitre.org/cve/request_id.html](https://cve.mitre.org/cve/request_id.html) Otherwise, an open source CVE should be filed for here: [iwantacve.org](https://iwantacve.org/) #### Option 2: Manually validate the release artifacts If this project's build is [fully reproducible](https://en.wikipedia.org/wiki/Reproducible_builds). An alternative to filing for a CVE is to go back and build the earlier releases (with the HTTPS patch applied) to confirm the artifacts were not tampered when they were built. This can be done by comparing the hashes of the artifacts built locally with the ones published. If the hashes of all previous artifacts match those that are published, you can safely assume that the releases were not tampered with. Again, this assumes that the build if fully reproducible and will require significantly more work.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]