CyberSecBulletin
CVE-2023-36845Exploited in the wildNVD status: Analyzed

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.

Patch now

Attackers are already exploiting this vulnerability, according to CISA.

What to do

  1. 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.
  2. Update Junos to 20.4 or a later version.
  3. CISA's required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
  4. Read the advisory on supportportal.juniper.net for workarounds and exact fixed builds.
  5. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
Juniper NetworksJunos OSbefore 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 ranges20.4R3-S9, 21.1*, 21.2R3-S7, 21.3R3-S5, 21.4R3-S5, 22.1R3-S4
Juniper NetworksJunosbefore 20.4; 20.4; 21.1; 21.2; 21.3; 21.4; 22.1; 22.2; and 3 more ranges20.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

  1. CVE record published.
  2. Added to CISA's Known Exploited Vulnerabilities catalogue.
  3. CISA published its SSVC assessment (exploitation: active, automatable: yes, technical impact: total).
  4. Deadline for US federal agencies to remediate, set by CISA.
  5. Record last changed materially (score, affected products, status or references).

References

Third-party and government advisories

Technical write-ups (may include proof of concept)

Other vulnerabilities in Junos OS

All Junos OS vulnerabilities

Recent PHP External Variable Modification vulnerabilities

Spotted an error? Tell us.