CVE-2023-36845

Junos OS: EX and SRX Series: A PHP vulnerability in J-Web allows an unauthenticated to control an important environment variable

Basic Information

CVE State
PUBLISHED
Reserved Date
June 27, 2023
Published Date
August 17, 2023
Last Updated
February 13, 2025
Vendor
Juniper Networks
Product
Junos OS
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.

CVSS Scores

CVSS v3.1

9.8 - CRITICAL

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

SSVC Information

Exploitation
active
Automatable
Yes
Technical Impact
total

Exploit Status

Exploited in the Wild
Yes (added 2023-11-13 00:00:00 UTC) Source
Proof of Concept Available
Yes (added 2024-02-18 15:37:58 UTC) Source

Known Exploited Vulnerability Information

Source Added Date
CISA 2023-11-13 00:00:00 UTC

Recent Mentions

The 2025 Verizon Data Breach Investigations Report (DBIR) reveals that vulnerability exploitation was present in 20% of breaches — a 34% increase year-over-year. To support the report, Tenable Research contributed enriched data on the most exploited vulnerabilities. In this blog, we analyze 17 edge-related CVEs and remediation trends across industry sectors.BackgroundSince 2008, Verizon’s annual Data Breach Investigations Report (DBIR) has helped organizations understand evolving cyber threats. For the 2025 edition, Tenable Research contributed enriched data on the most exploited vulnerabilities of the past year. We analyzed over 160 million data points and zeroed-in on the 17 edge device CVEs featured in the DBIR to understand their average remediation times. In this blog, we take a closer look at these vulnerabilities, revealing industry-specific trends and highlighting where patching still lags — often by months.In this year’s DBIR, vulnerabilities in Virtual Private Networks (VPNs) and edge devices were particular areas of concern, accounting for 22% of the CVE-related breaches in this year’s report, almost eight times the amount of 3% found in the 2024 report.AnalysisThe 2025 DBIR found that exploitation of vulnerabilities surged to be one of the top initial access vectors for 20% of data breaches. This represents a 34% increase over last year’s report and is driven in part by the zero-day exploitation of VPN and edge device vulnerabilities – asset classes that traditional endpoint detection and response (EDR) vendors struggle to assess effectively. The DBIR calls special attention to 17 CVEs affecting these edge devices, which remain valuable targets for attackers. Tenable Research analyzed these 17 CVEs and evaluated which industries had the best and worst remediation rates across the vulnerabilities. As a primer, the table below provides this list of CVEs and details for each, including their Common Vulnerability Scoring System (CVSS) and Tenable...

Potential Proof of Concepts

Warning: These PoCs have not been tested and could contain malware. Use at your own risk.

junos_phprc_auto_prepend_file

Type: metasploit • Created: Unknown

Metasploit module for CVE-2023-36845

e11i0t4lders0n/CVE-2023-36845

Type: github • Created: 2024-02-18 15:37:58 UTC • Stars: 1

CVE-2023-36845 – Unauthenticated Juniper Remote Code Execution Vulnerability Scanner

ifconfig-me/CVE-2023-36845

Type: github • Created: 2024-02-17 08:15:30 UTC • Stars: 0

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.

ak1t4/CVE-2023-36845

Type: github • Created: 2024-02-13 20:59:34 UTC • Stars: 5

CVES

cyberh3als/CVE-2023-36845-POC

Type: github • Created: 2023-10-02 06:28:07 UTC • Stars: 2

CVE-2023-36845 PoC script automates the PoC for CVE-2023-36845 targeting Juniper Networks Junos OS's J-Web component on EX and SRX Series devices. It exploits a PHP flaw, allowing remote modification of the PHPRC variable. Successful exploitation can lead to code injection and execution.

zaenhaxor/CVE-2023-36845

Type: github • Created: 2023-09-29 03:11:37 UTC • Stars: 3

CVE-2023-36845 - Juniper Firewall Remote code execution (RCE)

kljunowsky/CVE-2023-36845

Type: github • Created: 2023-09-26 17:56:55 UTC • Stars: 51

Juniper Firewalls CVE-2023-36845 - RCE