Using an insecure protocol like HTTP or FTP to download your dependencies leaves your Maven build vulnerable to a Man in the Middle (MITM). This can allow attackers to inject malicious code into the artifacts that you are resolving and infect build artifacts that are being produced. This can be used by attackers to perform a Supply chain attack against your project's users.

This vulnerability has a CVSS v3.1 base score of 8.1/10 .

Always use HTTPS or SFTP to download artifacts from artifact servers.

These examples show examples of locations in Maven POM files where artifact repository upload/download is configured. The first shows the use of HTTP, the second shows the use of HTTPS.

  • Research: Want to take over the Java ecosystem? All you need is a MITM!
  • Research: How to take over the computer of any Java (or Closure or Scala) Developer.
  • Proof of Concept: mveytsman/dilettante
  • Additional Gradle & Maven plugin: Announcing nohttp
  • Java Ecosystem Announcement: HTTP Decommission Artifact Server Announcements