Juniper Junos OS EX Series and SRX Series PHP External Variable Modification
CVE-2023-36845 is a critical-severity PHP external variable modification vulnerability in Junos OS from Juniper Networks, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists versions 20.4R3-S9, 21.1*, 21.2R3-S7 as the first without the flaw, so updating Junos OS to one of those releases or later removes the exposure. CISA added it to the Known Exploited Vulnerabilities catalogue on November 13, 2023, which means attacks have been observed in the wild.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Update Junos OS to 20.4R3-S9 or 21.1* or 21.2R3-S7 or 21.3R3-S5, whichever matches your release line, or a later version.
- Update Junos to 20.4 or a later version.
- CISA's required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
- Read the advisory on supportportal.juniper.net for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Juniper Networks | Junos OS | before 20.4R3-S9; 21.1 up to, but not including, 21.1*; 21.2 up to, but not including, 21.2R3-S7; 21.3 up to, but not including, 21.3R3-S5; 21.4 up to, but not including, 21.4R3-S5; 22.1 up to, but not including, 22.1R3-S4; 22.2 up to, but not including, 22.2R3-S2; 22.3 up to, but not including, 22.3R2-S2, 22.3R3-S1; and 2 more ranges | 20.4R3-S9, 21.1*, 21.2R3-S7, 21.3R3-S5, 21.4R3-S5, 22.1R3-S4 |
| Juniper Networks | Junos | before 20.4; 20.4; 21.1; 21.2; 21.3; 21.4; 22.1; 22.2; and 3 more ranges | 20.4 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by CNA (juniper.net).
Official description
A PHP External Variable Modification vulnerability in J-Web of Juniper Networks Junos OS on EX Series and SRX Series allows an unauthenticated, network-based attacker to remotely execute code. Using a crafted request which sets the variable PHPRC an attacker is able to modify the PHP execution environment allowing the injection und execution of code. This issue affects Juniper Networks Junos OS on EX Series and SRX Series: * All versions prior to 20.4R3-S9; * 21.1 versions 21.1R1 and later; * 21.2 versions prior to 21.2R3-S7; * 21.3 versions prior to 21.3R3-S5; * 21.4 versions prior to 21.4R3-S5; * 22.1 versions prior to 22.1R3-S4; * 22.2 versions prior to 22.2R3-S2; * 22.3 versions prior to 22.3R2-S2, 22.3R3-S1; * 22.4 versions prior to 22.4R2-S1, 22.4R3; * 23.2 versions prior to 23.2R1-S1, 23.2R2.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: PHP External Variable Modification
A PHP application does not properly protect against the modification of variables from external sources, such as query parameters or cookies. This can expose the application to numerous weaknesses that would not exist otherwise.
More PHP External Variable Modification vulnerabilities (CWE-473)
Timeline
- CVE record published.
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- CISA published its SSVC assessment (exploitation: active, automatable: yes, technical impact: total).
- Deadline for US federal agencies to remediate, set by CISA.
- Record last changed materially (score, affected products, status or references).
References
Advisories
Third-party and government advisories
- cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2023-36845US Government Resource
Technical write-ups (may include proof of concept)
- packetstormsecurity.com/files/174865/Juniper-SRX-Firewall-EX-Switch-Remote-Code-Execution.htmlExploit, Third Party Advisory, VDB Entry
- packetstormsecurity.com/files/176969/Juniper-SRX-Firewall-EX-Switch-Remote-Code-Execution.htmlExploit, Third Party Advisory, VDB Entry
Other vulnerabilities in Junos OS
- 7.5 High severity
- 9.8 Critical severity
- 9.8 Critical severity
- 8.8 High severity
- 8.8 High severity
- 7.5 High severity
Recent PHP External Variable Modification vulnerabilities
- 5.3 Medium severity
Spotted an error? Tell us.