CVE-2024-30391 Overview
CVE-2024-30391 is a Missing Authentication for Critical Function vulnerability [CWE-306] in the Packet Forwarding Engine (pfe) of Juniper Networks Junos OS. The flaw affects MX Series devices with SPC3 line cards and the SRX Series firewall family. When operators configure IPsec tunnels with the hmac-sha-384 or hmac-sha-512 authentication algorithms, the device silently omits authentication data on egress and skips verification on ingress. Two affected peers still pass encrypted traffic, yet the Command Line Interface (CLI) falsely reports that Hash-based Message Authentication Code (HMAC) authentication is active. A network-based attacker can exploit this gap to affect integrity or availability of transit traffic without credentials.
Critical Impact
IPsec tunnels using hmac-sha-384 or hmac-sha-512 transmit encrypted traffic without authentication, breaking integrity guarantees while CLI output continues to indicate that authentication is enforced.
Affected Products
- Juniper Junos OS on MX Series (MX240, MX480, MX960) equipped with SPC3
- Juniper Junos OS on SRX Series (SRX100 through SRX5800, including cSRX and vSRX)
- Junos OS versions before 20.4R3-S7, 21.1 before 21.1R3, 21.2 before 21.2R2-S1/21.2R3, and 21.3 before 21.3R1-S2/21.3R2
Discovery Timeline
- 2024-04-12 - CVE-2024-30391 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-30391
Vulnerability Analysis
The Packet Forwarding Engine on affected Junos OS releases fails to attach HMAC authentication data to Encapsulating Security Payload (ESP) frames when the tunnel is configured with hmac-sha-384 or hmac-sha-512. The tunnel negotiation completes normally through the Internet Key Exchange (IKE) daemon, and both peers install Security Associations (SAs). The pfe then processes packets without invoking the SHA-384 or SHA-512 HMAC routines, sending ciphertext with no Integrity Check Value (ICV) and accepting inbound ciphertext without verifying one.
If the remote peer is a non-vulnerable device, traffic breaks in both directions because the peer rejects packets missing an ICV. If both peers are affected, transit traffic flows successfully, but with no cryptographic assurance of integrity or origin. CLI operational commands such as show security ipsec security-associations detail continue to display the configured HMAC algorithm, masking the missing protection from operators and auditors.
Root Cause
The issue is a Missing Authentication for Critical Function condition in the SPC3 and SRX packet processing path. The code path that handles hmac-sha-384 and hmac-sha-512 algorithms does not invoke the authentication step, while other HMAC algorithms operate correctly. Control-plane state remains inconsistent with data-plane behavior.
Attack Vector
An unauthenticated network-based attacker positioned between affected peers can tamper with in-flight IPsec traffic because packets carry no ICV to verify. The attacker can inject, modify, or drop encrypted frames, and the receiving device will process them without rejection. Denial-of-service conditions arise when an affected device peers with a compliant IPsec implementation that discards unauthenticated packets.
No verified exploit code is public. See the Juniper Security Advisory JSA79188 for vendor-supplied technical details.
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2024-30391
Indicators of Compromise
- Sudden failure of transit traffic across established IPsec tunnels where the local peer runs Junos OS on MX with SPC3 or on SRX, and the remote peer is a non-Juniper or unpatched device using hmac-sha-384 or hmac-sha-512.
- ESP packets captured on the wire with an ICV length inconsistent with the configured HMAC algorithm.
- Tunnel counters showing successful encryption but remote-peer logs reporting authentication failures or dropped packets.
Detection Strategies
- Audit all IPsec proposals with show security ipsec proposal and show configuration security ipsec to enumerate tunnels using authentication-algorithm hmac-sha-384 or hmac-sha-512.
- Compare packet captures on both tunnel endpoints for ICV presence and length. A missing or truncated ICV on egress from a Junos device indicates the vulnerable code path is active.
- Cross-reference software inventory against the fixed release list in JSA79188 to identify hosts running vulnerable Junos versions on MX SPC3 or SRX hardware.
Monitoring Recommendations
- Alert on IPsec SA re-negotiation failures and sustained packet drops on tunnels using SHA-384 or SHA-512 HMAC.
- Forward Junos syslog and flow telemetry into a centralized analytics platform to correlate tunnel state with peer-side authentication errors.
- Track configuration drift on security ipsec stanzas so any change to authentication-algorithm is reviewed before deployment.
How to Mitigate CVE-2024-30391
Immediate Actions Required
- Inventory all MX Series devices with SPC3 line cards and all SRX Series firewalls, then confirm the Junos OS version against the fixed releases.
- Upgrade to Junos OS 20.4R3-S7, 21.1R3, 21.2R2-S1, 21.2R3, 21.3R1-S2, 21.3R2, or later per JSA79188.
- Where upgrades cannot be scheduled immediately, reconfigure affected IPsec tunnels to use an unaffected HMAC algorithm such as hmac-sha-256-128.
Patch Information
Juniper Networks addressed the flaw in Junos OS 20.4R3-S7, 21.1R3, 21.2R2-S1, 21.2R3, 21.3R1-S2, 21.3R2, and all later releases. Full remediation details and PR references are documented in the Juniper Security Advisory JSA79188.
Workarounds
- Switch tunnel configuration from hmac-sha-384 or hmac-sha-512 to a supported algorithm such as hmac-sha-256-128 on both peers until the patch is deployed.
- Restrict IPsec peer relationships to trusted paths and monitor upstream transit for tampering while the vulnerable code path is in production.
- Segment management access to MX SPC3 and SRX platforms so that only authorized administrators can modify security ipsec configuration during remediation.
# Example: replace vulnerable HMAC algorithm on an SRX IPsec proposal
set security ipsec proposal PROP-AES256 authentication-algorithm hmac-sha-256-128
delete security ipsec proposal PROP-AES256 authentication-algorithm hmac-sha-384
commit and-quit
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

