Saturday, May 18, 2024

Juniper JunOS RCE Flaw Let Unauthenticated Remote Attacker Execute Code

The J-Web component of Juniper Networks’ Junos OS has been discovered to contain a number of vulnerabilities, one or more of which may allow remote code execution, cross-site scripting attacks, route injection, traversal, or local file inclusion.

According to Octagon Networks, “Chief among them is a remote pre-authenticated PHP archive file deserialization vulnerability (CVE-2022-22241, CVSS score: 8.1) in the J-Web component of Junos OS”.

Details of Vulnerabilities

CVE-2022-22241: Remote pre-authenticated Phar Deserialization to RCE- (CVSS score: 8.1)

“An Improper Input Validation vulnerability in the J-Web component of Juniper Networks Junos OS may allow an unauthenticated attacker to access data without proper authorization”, Juniper Networks

When parsed by a PHP file operation function, the metadata in Phar files (PHP Archive) files is deserialized because it is stored in a serialized format. 

Reports say this behavior can be abused by an attacker to take advantage of a Juniper codebase object instantiation vulnerability.

Notably, deserialization will take place even using PHP functions that do not eval PHP code like file_get_contents(), fopen(), file() or file_exists(), md5_file(), filemtime() or filesize(), is_dir(), if user input is passed to the functions.

An unauthenticated remote attacker can make use of this vulnerability to have remote phar files deserialized, which results in arbitrary file writing and a remote code execution (RCE) vulnerability.

CVE-2022-22242: pre-authenticated reflected XSS on the error page- (CVSS score: 6.1)

This is a Cross-site Scripting (XSS) vulnerability found in the J-Web component of Juniper Networks Junos OS allows an unauthenticated attacker to run malicious scripts reflected off of J-Web to the victim’s browser in the context of their session within J-Web.

This flaw can be used with other vulnerabilities that require authentication or allow a remote unauthenticated attacker to steal JunOS admin sessions.

CVE-2022-22243– (CVSS score: 4.3) and & CVE-2022-22244 – (CVSS score: 5.3): XPATH Injection

It is an XPath Injection vulnerability caused due to Improper Input Validation in the J-Web component of Juniper Networks Junos OS. 

This allows an attacker to add an XPath command to the XPath stream that let chaining to other unspecified vulnerabilities, leading to a partial loss of confidentiality.

It can be exploited by a remote authenticated attacker to manipulate JunOS admin sessions or manipulate the XPATH stream that the server uses to talk with its XML parsers.

CVE-2022-22245: Path traversal during file upload leads to RCE – (CVSS score: 4.3)

This is a Path Traversal vulnerability in the J-Web component of Juniper Networks Junos OS. It allows attackers to upload arbitrary files to the device by bypassing validation checks built into Junos OS. 

The successful exploitation of this vulnerability could lead to loss of filesystem integrity. Reports say this flaw can be exploited by attackers to execute PHP code by uploading a file with a special name.

CVE-2022-22246: PHP Local File Inclusion (LFI) vulnerability – (CVSS score: 7.5)

This PHP Local File Inclusion (LFI) vulnerability was found in the J-Web component of Juniper Networks Junos OS. This may allow a low-privileged authenticated attacker to execute an untrusted PHP file. The successful exploitation could lead to a complete system compromise.

Fix Available

The issues are addressed in Junos OS versions 19.1R3-S9, 19.2R3-S6, 19.3R3-S7, 19.4R3-S9, 20.1R3-S5, 20.2R3-S5, 20.3R3-S5, 20.4R3-S4, 21.1R3-S2, 21.3R3, 21.4R3, 22.1R2, 22.2R1, and later.

Therefore, the users are recommended to apply the software patch available for Junos OS as early as possible to prevent the abovementioned threats.


Latest articles

Norway Recommends Replacing SSLVPN/WebVPN to Stop Cyber Attacks

A very important message from the Norwegian National Cyber Security Centre (NCSC) says that...

New Linux Backdoor Attacking Linux Users Via Installation Packages

Linux is widely used in numerous servers, cloud infrastructure, and Internet of Things devices,...

ViperSoftX Malware Uses Deep Learning Model To Execute Commands

ViperSoftX malware, known for stealing cryptocurrency information, now leverages Tesseract, an open-source OCR engine,...

Santander Data Breach: Hackers Accessed Company Database

Santander has confirmed that there was a major data breach that affected its workers...

U.S. Govt Announces Rewards up to $5 Million for North Korean IT Workers

The U.S. government has offered a prize of up to $5 million for information...

Russian APT Hackers Attacking Critical Infrastructure

Russia leverages a mix of state-backed Advanced Persistent Threat (APT) groups and financially motivated...

Millions Of IoT Devices Vulnerable To Attacks Leads To Full Takeover

Researchers discovered four significant vulnerabilities in the ThroughTek Kalay Platform, which powers 100 million...
Guru baran
Guru baran
Gurubaran is a co-founder of Cyber Security News and GBHackers On Security. He has 10+ years of experience as a Security Consultant, Editor, and Analyst in cybersecurity, technology, and communications.

Free Webinar

Live API Attack Simulation

94% of organizations experience security problems in production APIs, and one in five suffers a data breach. As a result, cyber-attacks on APIs increased from 35% in 2022 to 46% in 2023, and this trend continues to rise.
Key takeaways include:

  • An exploit of OWASP API Top 10 vulnerability
  • A brute force ATO (Account Takeover) attack on API
  • A DDoS attack on an API
  • Positive security model automation to prevent API attacks

Related Articles