Product Affected

This issue affects Junos OS 21.2, 21.4, 22.2, 22.3, 22.4, 23.2, 23.4. Affected platforms: SRX Series, EX Series with J-Web.
High
CVSS 3.1: 8.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H)
CVSS 4.0: 6.8 (CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/AU:Y/R:I/V:C/RE:L/U:Amber)

Problem

An Improper Neutralization of Data within XPath Expressions ('XPath Injection') vulnerability in J-Web shipped with Juniper Networks Junos OS allows an unauthenticated, network-based attacker to execute remote commands on the target device. 

While an administrator is logged into a J-Web session or has previously logged in and subsequently logged out of their J-Web session, the attacker can arbitrarily execute commands on the target device with the other user's credentials. In the worst case, the attacker will have full control over the device.

This issue affects Junos OS: 

  • All versions before 21.2R3-S8, 
  • from 21.4 before 21.4R3-S7,
  • from 22.2 before 22.2R3-S4,
  • from 22.3 before 22.3R3-S3,
  • from 22.4 before 22.4R3-S2,
  • from 23.2 before 23.2R2,
  • from 23.4 before 23.4R1-S1, 23.4R2.
The following minimal configuration must be present on the device:

[system services web-management http]
or
[system services web-management https]
 

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

This issue was discovered during external security research.


 

Solution

The following software releases have been updated to resolve this specific issue: 21.2R3-S8, 21.4R3-S7, 22.2R3-S4, 22.3R3-S3, 22.4R3-S2, 23.2R2, 23.4R1-S1, 23.4R2, 24.2R1, and all subsequent releases.

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

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

Workaround

There are no known workarounds for this issue other than disabling J-Web when not in use.

Juniper Networks has written an effective countermeasure for this attack at IDP Signature SigPack #3675 onward, released on 07 February 2024. The signature “HTTP:PHP:LAUNCHPAD-CMD-INJ” will identify and block the attack. For best effect, customers may deploy this signature on devices where J-Web is not used.

Methods which may reduce, but not eliminate, the risk for exploitation of these problems, and which does not mitigate or resolve the underlying problem include:
• Deploying the appropriate IDP Signature on devices which do not have J-Web enabled which protect the device downstream which requires J-Web to be enabled.
• Disabling J-Web and using only alternate options such as Netconf over SSH for device management
• Restricting the use of J-Web to low-privileged accounts only

In addition to the recommendations listed above, it is good security practice to limit the exploitable attack surface of critical infrastructure networking equipment. Use access lists or firewall filters to limit access to the device only from trusted, administrative networks or hosts.

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-07-10: Initial Publication
2024-07-15: Acknowledgement added for reporting party.
2024-07-17: Reporter requested minor change in reporting party text due to org change.
2024-09-13: Minor formatting change to CVSS field


Related Information

Acknowledgements

Juniper SIRT would like to acknowledge and thank CataLpa of DbappSecurity Co. Ltd. for responsibly reporting this vulnerability.