Skip to main content

CVE-2024-5764: Nexus Repository Hard-coded Credentials Flaw

CVE-2024-5764 is a hard-coded credentials vulnerability in Sonatype Nexus Repository Manager that exposes encrypted secrets through a static passphrase. This article covers the technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-5764 Overview

Sonatype Nexus Repository contains a hard-coded credentials vulnerability [CWE-798] in the component responsible for encrypting secrets stored in the configuration database. The affected code relies on a static hard-coded encryption passphrase to protect SMTP credentials, HTTP proxy credentials, user tokens, and other sensitive values. Administrators could define an alternate passphrase, but only during first boot and without a mechanism to rotate it afterward. Any attacker with local access to the configuration database can decrypt stored secrets using the known static passphrase. The issue affects Nexus Repository versions 3.0.0 through 3.72.0.

Critical Impact

Attackers with access to the Nexus Repository configuration database can decrypt stored SMTP credentials, HTTP proxy credentials, and user tokens by using the publicly known hard-coded encryption passphrase.

Affected Products

  • Sonatype Nexus Repository 3.0.0 through 3.72.0
  • Sonatype Nexus Repository Manager (OSS and Pro editions in the affected range)
  • Deployments where the default encryption passphrase was never replaced at first boot

Discovery Timeline

  • 2024-10-23 - CVE-2024-5764 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-5764

Vulnerability Analysis

Nexus Repository stores sensitive configuration values in its backing database. These include SMTP passwords, HTTP proxy credentials, user tokens, and integration secrets. To avoid persisting these values in plaintext, Nexus encrypts them using a symmetric passphrase before writing them to the database.

The affected versions ship with a static, hard-coded passphrase compiled into the product. Any attacker who obtains the ciphertext and knows the passphrase can recover the plaintext secrets. Administrators had an option to supply a custom passphrase, but only during the initial boot of a fresh installation. Existing deployments could not rotate the key, and administrators who missed the initial window were permanently bound to the shipped default.

The exposure converts a database read into full secret disclosure. Downstream credentials protected by Nexus can then be reused against SMTP relays, proxies, and upstream repositories.

Root Cause

The root cause is the use of a hard-coded cryptographic key material embedded in the application, combined with a key-management design that does not support rotation. The custom passphrase feature is write-once at first boot, which prevents administrators from recovering from exposure of the default key.

Attack Vector

Exploitation requires local access to artifacts that contain the encrypted secrets, typically the configuration database files, backups, or snapshots. An attacker who gains read access to these files extracts the ciphertext, applies the known passphrase, and recovers plaintext credentials. No authentication to the Nexus application itself is required if the attacker already holds the database contents. The vulnerability is referenced in the Sonatype Support Article.

Detection Methods for CVE-2024-5764

Indicators of Compromise

  • Unauthorized read access to the Nexus Repository configuration database, backups, or filesystem paths containing encrypted secrets.
  • Unexpected outbound SMTP or HTTP proxy authentication attempts using credentials that were only stored inside Nexus.
  • Use of Nexus user tokens from source IP addresses or user agents that do not match normal administrative or build-system activity.

Detection Strategies

  • Inventory all Nexus Repository instances and record the running version to identify systems in the 3.0.0 through 3.72.0 range.
  • Audit filesystem and backup access to the Nexus data directory, focusing on processes and accounts outside the Nexus service identity.
  • Correlate authentication logs on SMTP relays, proxies, and upstream registries with the credentials known to be stored in Nexus.

Monitoring Recommendations

  • Alert on any read or copy operation against the Nexus configuration database by non-service accounts.
  • Monitor for use of Nexus-issued user tokens outside expected CI/CD source ranges.
  • Track administrative actions in Nexus that create, rotate, or export credentials and tokens.

How to Mitigate CVE-2024-5764

Immediate Actions Required

  • Upgrade Nexus Repository to a fixed version beyond 3.72.0 as published in the Sonatype advisory.
  • Rotate every secret previously stored in the Nexus configuration database, including SMTP credentials, HTTP proxy credentials, and user tokens.
  • Restrict filesystem and backup access to the Nexus data directory to the Nexus service account only.
  • Review historical backups and snapshots for exposure and apply the same rotation scope to any environment that received a copy.

Patch Information

Sonatype addresses the issue in Nexus Repository releases after 3.72.0. Refer to the Sonatype Support Article for the fixed version, upgrade path, and guidance on re-encrypting stored secrets with a per-instance passphrase.

Workarounds

  • Treat the Nexus configuration database and all backups as sensitive credential material and apply strict file permissions and encryption-at-rest controls.
  • Rotate any secret that was ever stored in an affected instance, since the hard-coded passphrase cannot be assumed confidential.
  • Isolate the Nexus host at the network layer so that only trusted administrators and build systems can reach the service and its storage.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.