Skip to content
Threat Feed
high advisory

Sonatype Nexus Repository Manager Remote Code Execution (CVE-2024-5082)

An authenticated remote code execution vulnerability in Sonatype Nexus Repository Manager 2 (up to 2.15.1) allows attackers to execute arbitrary code by uploading a malicious Maven artifact containing an evaluated Velocity template.

CVE search metadata

CVE search record: CVE-2024-5082. EPSS: 2.81%. KEV: no. Product: Nexus Repository Manager (<= 2.15.1). Brief: Sonatype Nexus Repository Manager Remote Code Execution (CVE-2024-5082). Brief link: https://feed.craftedsignal.io/briefs/2026-10-nexus-rce-cve-2024-5082/

Triage facts

Revision 1
Applicability
Nexus Repository Manager (<= 2.15.1)
Evidence
Unknown
Severity
High
Action
Elevated
Sources
2 public sources
Freshness
Revision 1Oct 29, 18:57 UTC
Detection
1 rule
Vulnerabilities
1 CVE
Source quality
B2Likely

CVE-2024-5082 is a remote code execution vulnerability affecting Sonatype Nexus Repository Manager 2 versions 2.15.1 and earlier. The vulnerability exists due to improper processing of Maven artifacts containing Velocity templates. An authenticated user with sufficient permissions to modify repository content can upload a crafted artifact and trigger the Velocity template engine, resulting in code execution within the security context of the Nexus JVM on the host server. Sonatype reports that this product reached end of life on June 30, 2025, and recommends migration to Nexus Repository 3.

Attack Chain

  1. Attacker authenticates to the Nexus Repository Manager using valid credentials.
  2. Attacker selects a hosted repository for which they have content update permissions.
  3. Attacker uploads a malicious Maven-style artifact containing an embedded Velocity template.
  4. Attacker modifies the artifact attributes via the Nexus API to force the content generator to process the template as velocity.
  5. Attacker triggers the template evaluation by requesting or accessing the uploaded artifact.
  6. The Nexus Repository Manager evaluates the Velocity template, leading to command execution on the host server.
  7. The process creates an outbound network connection (e.g., a reverse shell) from the Nexus host to the attacker-controlled listener.

Impact

Successful exploitation results in arbitrary command execution on the Nexus Repository host with the privileges of the Nexus JVM. While the vulnerability requires authentication, a compromised repository manager can lead to broader supply-chain contamination by allowing attackers to modify trusted artifacts or credentials stored within the repository.

Recommendation

  • Migrate from Nexus Repository Manager 2 to Nexus Repository 3 immediately, as version 2 is end-of-life and unsupported.
  • For organizations unable to migrate immediately, upgrade to Nexus Repository Manager 2.15.2, which contains the fix for CVE-2024-5082.
  • Audit access logs for authenticated users performing anomalous API interactions, particularly those involving maven-metadata.xml or attribute updates related to Velocity processing.
  • Restrict repository write permissions to only those accounts and CI/CD service principals strictly requiring them.
  • Monitor for unexpected outbound network traffic (egress) originating from the Nexus Repository host server.

Immediate actions

Inventory all Nexus Repository Manager 2 instances and schedule migration to version 3

IT Operations 72h

Threat Hunt

Identify unauthorized account activity and unusual outbound network connections from Nexus Repository hosts

T1059 high high confidence hunt now

Data: Egress netflow logs, Nexus authentication audit logs

Mitigations

Upgrade to Nexus Repository Manager 2.15.2 or decommission Nexus Repository Manager 2

immediate IT Operations

CVE-2024-5082

Detection coverage 1

Detect CVE-2024-5082 Exploitation - Malicious Velocity Template Upload

high

Detects potential exploitation of CVE-2024-5082 by monitoring web access logs for API calls that update artifact attributes to Velocity processing in conjunction with file uploads.

sigma tactics: execution, initial_access techniques: T1059.003 sources: webserver

Detection queries are available on the platform. Get full rules →