HackerPapers

arXiv:2407.18760cs.CR

Maven-Hijack: Software Supply Chain Attack Exploiting Packaging Order

Frank Reyes, Federico Bono, Aman Sharma, Benoit Baudry, Martin Monperrus

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

Java projects frequently rely on package managers such as Maven to manage complex webs of external dependencies. While these tools streamline development, they also introduce subtle risks to the software supply chain. In this paper, we present Maven-Hijack, a novel attack that exploits the order in which Maven packages dependencies and the way the Java Virtual Machine resolves classes at runtime. By injecting a malicious class with the same fully qualified name as a legitimate one into a dependency that is packaged earlier, an attacker can silently override core application behavior without modifying the main codebase or library names. We demonstrate the real-world feasibility of this attack by compromising the Corona-Warn-App, a widely used open-source COVID-19 contact tracing system, and gaining control over its database connection logic. We evaluate three mitigation strategies, such as sealed JARs, Java Modules, and the Maven Enforcer plugin. Our results show that, while Java Modules offer strong protection, the Maven Enforcer plugin with duplicate class detection provides the most practical and effective defense for current Java projects. These findings highlight the urgent need for improved safeguards in Java's build and dependency management processes to prevent stealthy supply chain attacks.

arXiv comments
Journal reference
Proceedings of ACM Workshop on Software Supply Chain Offensive Research and Ecosystem Defenses (SCORED), 2025
DOI
doi:10.1145/3733827.3765523
Subjects
cs.CRCryptography and Security cs.SESoftware Engineering

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Nov 2025 to Nov 2025.

Comments linking this paper, per year.

Discussed in comments1 thread

    • There were. They're just not as popular here. For example https://www.sonatype.com/blog/malware-removed-from-maven-cen... Maven is also a bit more complex than npm and had an issue in the system itself https://arxiv.org/html/2407.18760v4

      viraptorView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.