CVE-2025-30095
Published: 31 March 2025
Summary
CVE-2025-30095 is a critical-severity Use of Hard-coded Cryptographic Key (CWE-321) vulnerability in Vyos (inferred from references). Its CVSS base score is 9.0 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Adversary-in-the-Middle (T1557); ranked in the top 43.6% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified are NIST 800-53 SC-12 (Cryptographic Key Establishment and Management) and SI-2 (Flaw Remediation).
Threat & Defense at a Glance
Threat & Defense Details
Mitigating Controls (NIST 800-53 r5)AI
Directly requires establishment and management of unique cryptographic host keys for Dropbear SSH daemon, preventing MITM attacks from identical keys across installations.
Mandates identification, reporting, and correction of flaws like CVE-2025-30095 through patching to VyOS 1.4.2 or later, eliminating shared Dropbear keys.
Ensures configuration settings for Dropbear enforce generation of unique host keys per installation, addressing the hardcoded key issue in live-build environments.
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
The vulnerability enables active man-in-the-middle attacks on SSH due to identical/predictable Dropbear host keys, directly facilitating Adversary-in-the-Middle (T1557) for eavesdropping, command injection, or server impersonation.
NVD Description
VyOS 1.3 through 1.5 (fixed in 1.4.2) or any Debian-based system using dropbear in combination with live-build has the same Dropbear private host keys across different installations. Thus, an attacker can conduct active man-in-the-middle attacks against SSH connections if Dropbear…
more
is enabled as the SSH daemon. I n VyOS, this is not the default configuration for the system SSH daemon, but is for the console service. To mitigate this, one can run "rm -f /etc/dropbear/*key*" and/or "rm -f /etc/dropbear-initramfs/*key*" and then dropbearkey -t rsa -s 4096 -f /etc/dropbear_rsa_host_key and reload the service or reboot the system before using Dropbear as the SSH daemon (this clears out all keys mistakenly built into the release image) or update to the latest version of VyOS 1.4 or 1.5. Note that this vulnerability is not unique to VyOS and may appear in any Debian-based Linux distribution that uses Dropbear in combination with live-build, which has a safeguard against this behavior in OpenSSH but no equivalent one for Dropbear.
Deeper analysisAI
CVE-2025-30095 affects VyOS versions 1.3 through 1.5, with a fix available in 1.4.2, as well as any Debian-based Linux distribution using Dropbear in combination with live-build. The vulnerability stems from identical Dropbear private host keys being generated across different installations, enabling active man-in-the-middle (MITM) attacks on SSH connections when Dropbear serves as the SSH daemon. In VyOS, Dropbear is not the default system SSH daemon but is enabled by default for the console service. This issue, tied to CWE-321 (use of hard-coded cryptographic keys), carries a CVSS v3.1 base score of 9.0 (AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H).
A network-based attacker with no privileges can exploit this vulnerability by positioning themselves to intercept SSH traffic to affected systems running Dropbear. The high attack complexity arises from the need for active network manipulation, but successful exploitation allows full MITM control, enabling the attacker to eavesdrop on sessions, inject malicious commands, or impersonate the server, resulting in high confidentiality, integrity, and availability impacts due to the cross-scope effects.
VyOS advisories recommend mitigating by removing default keys with commands such as "rm -f /etc/dropbear/*key*" and "rm -f /etc/dropbear-initramfs/*key*", then generating a new RSA host key using "dropbearkey -t rsa -s 4096 -f /etc/dropbear_rsa_host_key", followed by reloading the service or rebooting. Updating to the latest VyOS 1.4 or 1.5 releases also resolves the issue. Additional details are available in VyOS blog posts and the issue tracker at vyos.dev/T7217. Note that OpenSSH includes safeguards against this behavior, but Dropbear lacks an equivalent in live-build environments.
Details
- CWE(s)