Product Affected

This issue affects all versions of Junos OS and Junos OS Evolved with the ChaCha20-poly1305 SSH cipher enabled.
Low
3.7 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N)

Problem

An Improper Validation of Integrity Check Value vulnerability in OpenSSH before 9.6 of Juniper Networks Junos OS and Junos OS Evolved allows a remote attacker to bypass integrity checks such that some packets are omitted (from the extension negotiation message), and a client and server may consequently end up with a connection for which some security features have been downgraded or disabled, aka the Terrapin Attack.


The most serious identified impact is that it lets an on-path attacker delete the SSH2_MSG_EXT_INFO message sent before authentication starts, allowing the attacker to disable a subset of the keystroke timing obfuscation features introduced in OpenSSH 9.5. There is no other discernable impact to session secrecy or session integrity.


Since we do not use OpenSSH 9.5 in Junos OS or Junos OS Evolved, the impact of this issue is limited to a stuck connection in the initial handshake stage. Therefore, it is not as severe as the issue seen in OpenSSH 9.5


Note: This issue is only affected when an on-path attacker at the network layer intercepts and modifies the handshake exchange, and the connection is secured by either ChaCha20-Poly1305 or CBC with Encrypt-then-MAC.


Juniper SIRT is not aware of any malicious exploitation of this vulnerability.
 

This issue was discovered during external security research.


This issue has been assigned CVE-2023-48795.

Solution

This issue can be completely remediated by excluding the chacha20-poly1305 cipher from SSH and configuring the following ciphers for SSH:

user@junos# set system services ssh ciphers [[email protected] [email protected]]

The chacha20-poly1305 cipher has been hidden and deprecated in the following releases:


Junos OS: 19.4R3-S13, 20.4R3-S10, 21.4R3-S6, 22.1R3-S5, 22.2R3-S3, 22.4R3-S1, 23.2R2, 23.4R2, 24.1R1, and all subsequent releases.
Junos OS Evolved: 19.4R3-S13, 20.4R3-S10, 21.4R3-S6, 22.1R3-S5, 22.2R3-S3, 22.4R3-S1, 23.2R2, 23.4R2, 24.1R1, and all subsequent releases.


This issue is being tracked as PR 1781732 which is visible on the Customer Support website.


Note: Juniper SIRT's policy [juniper.net] is not to evaluate releases which are beyond End of Engineering (EOE) or End of Life (EOL).

Workaround

See Solution section above for effective mitigation techniques.

Severity Assessment

Information for how Juniper Networks uses CVSS can be found at KB 16446 [juniper.net] "Common Vulnerability Scoring System (CVSS) and Juniper's Security Advisories."

Modification History

  • 2024-01-25: Initial Publication.

Related Information

Acknowledgements

  • Researchers from the Ruhr University Bochum developed the Terrapin attack and also discovered exploitable implementation flaws in AsyncSSH. 
  • Terrapin Attack: Breaking SSH Channel Integrity By Sequence Number Manipulation, Fabian Bäumer, Marcus Brinkmann, Jörg Schwenk.