CVE Vulnerabilities

CVE-2022-22241

Deserialization of Untrusted Data

Published: Oct 18, 2022 | Modified: Oct 20, 2022
CVSS 3.x
9.8
CRITICAL
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
Ubuntu

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. Utilizing a crafted POST request, deserialization may occur which could lead to unauthorized local file access or the ability to execute arbitrary commands. This issue affects Juniper Networks Junos OS: all versions prior to 19.1R3-S9; 19.2 versions prior to 19.2R3-S6; 19.3 versions prior to 19.3R3-S7; 19.4 versions prior to 19.4R2-S7, 19.4R3-S9; 20.1 versions prior to 20.1R3-S5; 20.2 versions prior to 20.2R3-S5; 20.3 versions prior to 20.3R3-S5; 20.4 versions prior to 20.4R3-S4; 21.1 versions prior to 21.1R3-S2; 21.2 versions prior to 21.2R3-S1; 21.3 versions prior to 21.3R2-S2, 21.3R3; 21.4 versions prior to 21.4R1-S2, 21.4R2-S1, 21.4R3; 22.1 versions prior to 22.1R1-S1, 22.1R2.

Weakness

The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.

Affected Software

Name Vendor Start Version End Version
Junos Juniper * 19.1 (excluding)
Junos Juniper 19.1 (including) 19.1 (including)
Junos Juniper 19.1-r1 (including) 19.1-r1 (including)
Junos Juniper 19.1-r1-s1 (including) 19.1-r1-s1 (including)
Junos Juniper 19.1-r1-s2 (including) 19.1-r1-s2 (including)
Junos Juniper 19.1-r1-s3 (including) 19.1-r1-s3 (including)
Junos Juniper 19.1-r1-s4 (including) 19.1-r1-s4 (including)
Junos Juniper 19.1-r1-s5 (including) 19.1-r1-s5 (including)
Junos Juniper 19.1-r1-s6 (including) 19.1-r1-s6 (including)
Junos Juniper 19.1-r2 (including) 19.1-r2 (including)
Junos Juniper 19.1-r2-s1 (including) 19.1-r2-s1 (including)
Junos Juniper 19.1-r2-s2 (including) 19.1-r2-s2 (including)
Junos Juniper 19.1-r2-s3 (including) 19.1-r2-s3 (including)
Junos Juniper 19.1-r3 (including) 19.1-r3 (including)
Junos Juniper 19.1-r3-s1 (including) 19.1-r3-s1 (including)
Junos Juniper 19.1-r3-s2 (including) 19.1-r3-s2 (including)
Junos Juniper 19.1-r3-s3 (including) 19.1-r3-s3 (including)
Junos Juniper 19.1-r3-s4 (including) 19.1-r3-s4 (including)
Junos Juniper 19.1-r3-s5 (including) 19.1-r3-s5 (including)
Junos Juniper 19.1-r3-s6 (including) 19.1-r3-s6 (including)
Junos Juniper 19.1-r3-s7 (including) 19.1-r3-s7 (including)
Junos Juniper 19.1-r3-s8 (including) 19.1-r3-s8 (including)
Junos Juniper 19.2 (including) 19.2 (including)
Junos Juniper 19.2-r1 (including) 19.2-r1 (including)
Junos Juniper 19.2-r1-s1 (including) 19.2-r1-s1 (including)
Junos Juniper 19.2-r1-s2 (including) 19.2-r1-s2 (including)
Junos Juniper 19.2-r1-s3 (including) 19.2-r1-s3 (including)
Junos Juniper 19.2-r1-s4 (including) 19.2-r1-s4 (including)
Junos Juniper 19.2-r1-s5 (including) 19.2-r1-s5 (including)
Junos Juniper 19.2-r1-s6 (including) 19.2-r1-s6 (including)
Junos Juniper 19.2-r1-s7 (including) 19.2-r1-s7 (including)
Junos Juniper 19.2-r1-s8 (including) 19.2-r1-s8 (including)
Junos Juniper 19.2-r1-s9 (including) 19.2-r1-s9 (including)
Junos Juniper 19.2-r2 (including) 19.2-r2 (including)
Junos Juniper 19.2-r2-s1 (including) 19.2-r2-s1 (including)
Junos Juniper 19.2-r3 (including) 19.2-r3 (including)
Junos Juniper 19.2-r3-s1 (including) 19.2-r3-s1 (including)
Junos Juniper 19.2-r3-s2 (including) 19.2-r3-s2 (including)
Junos Juniper 19.2-r3-s3 (including) 19.2-r3-s3 (including)
Junos Juniper 19.2-r3-s4 (including) 19.2-r3-s4 (including)
Junos Juniper 19.2-r3-s5 (including) 19.2-r3-s5 (including)
Junos Juniper 19.3 (including) 19.3 (including)
Junos Juniper 19.3-r1 (including) 19.3-r1 (including)
Junos Juniper 19.3-r1-s1 (including) 19.3-r1-s1 (including)
Junos Juniper 19.3-r2 (including) 19.3-r2 (including)
Junos Juniper 19.3-r2-s1 (including) 19.3-r2-s1 (including)
Junos Juniper 19.3-r2-s2 (including) 19.3-r2-s2 (including)
Junos Juniper 19.3-r2-s3 (including) 19.3-r2-s3 (including)
Junos Juniper 19.3-r2-s4 (including) 19.3-r2-s4 (including)
Junos Juniper 19.3-r2-s5 (including) 19.3-r2-s5 (including)
Junos Juniper 19.3-r2-s6 (including) 19.3-r2-s6 (including)
Junos Juniper 19.3-r3 (including) 19.3-r3 (including)
Junos Juniper 19.3-r3-s1 (including) 19.3-r3-s1 (including)
Junos Juniper 19.3-r3-s2 (including) 19.3-r3-s2 (including)
Junos Juniper 19.3-r3-s3 (including) 19.3-r3-s3 (including)
Junos Juniper 19.3-r3-s4 (including) 19.3-r3-s4 (including)
Junos Juniper 19.3-r3-s5 (including) 19.3-r3-s5 (including)
Junos Juniper 19.3-r3-s6 (including) 19.3-r3-s6 (including)
Junos Juniper 19.4 (including) 19.4 (including)
Junos Juniper 19.4-r1 (including) 19.4-r1 (including)
Junos Juniper 19.4-r1-s1 (including) 19.4-r1-s1 (including)
Junos Juniper 19.4-r1-s2 (including) 19.4-r1-s2 (including)
Junos Juniper 19.4-r1-s3 (including) 19.4-r1-s3 (including)
Junos Juniper 19.4-r1-s4 (including) 19.4-r1-s4 (including)
Junos Juniper 19.4-r2 (including) 19.4-r2 (including)
Junos Juniper 19.4-r2-s1 (including) 19.4-r2-s1 (including)
Junos Juniper 19.4-r2-s2 (including) 19.4-r2-s2 (including)
Junos Juniper 19.4-r2-s3 (including) 19.4-r2-s3 (including)
Junos Juniper 19.4-r2-s4 (including) 19.4-r2-s4 (including)
Junos Juniper 19.4-r2-s5 (including) 19.4-r2-s5 (including)
Junos Juniper 19.4-r2-s6 (including) 19.4-r2-s6 (including)
Junos Juniper 19.4-r3 (including) 19.4-r3 (including)
Junos Juniper 19.4-r3-s1 (including) 19.4-r3-s1 (including)
Junos Juniper 19.4-r3-s2 (including) 19.4-r3-s2 (including)
Junos Juniper 19.4-r3-s3 (including) 19.4-r3-s3 (including)
Junos Juniper 19.4-r3-s4 (including) 19.4-r3-s4 (including)
Junos Juniper 19.4-r3-s5 (including) 19.4-r3-s5 (including)
Junos Juniper 19.4-r3-s6 (including) 19.4-r3-s6 (including)
Junos Juniper 19.4-r3-s7 (including) 19.4-r3-s7 (including)
Junos Juniper 19.4-r3-s8 (including) 19.4-r3-s8 (including)
Junos Juniper 20.1 (including) 20.1 (including)
Junos Juniper 20.1-r1 (including) 20.1-r1 (including)
Junos Juniper 20.1-r1-s1 (including) 20.1-r1-s1 (including)
Junos Juniper 20.1-r1-s2 (including) 20.1-r1-s2 (including)
Junos Juniper 20.1-r1-s3 (including) 20.1-r1-s3 (including)
Junos Juniper 20.1-r1-s4 (including) 20.1-r1-s4 (including)
Junos Juniper 20.1-r2 (including) 20.1-r2 (including)
Junos Juniper 20.1-r2-s1 (including) 20.1-r2-s1 (including)
Junos Juniper 20.1-r2-s2 (including) 20.1-r2-s2 (including)
Junos Juniper 20.1-r3 (including) 20.1-r3 (including)
Junos Juniper 20.1-r3-s1 (including) 20.1-r3-s1 (including)
Junos Juniper 20.1-r3-s2 (including) 20.1-r3-s2 (including)
Junos Juniper 20.1-r3-s3 (including) 20.1-r3-s3 (including)
Junos Juniper 20.1-r3-s4 (including) 20.1-r3-s4 (including)
Junos Juniper 20.2 (including) 20.2 (including)
Junos Juniper 20.2-r1 (including) 20.2-r1 (including)
Junos Juniper 20.2-r1-s1 (including) 20.2-r1-s1 (including)
Junos Juniper 20.2-r1-s2 (including) 20.2-r1-s2 (including)
Junos Juniper 20.2-r1-s3 (including) 20.2-r1-s3 (including)
Junos Juniper 20.2-r2 (including) 20.2-r2 (including)
Junos Juniper 20.2-r2-s1 (including) 20.2-r2-s1 (including)
Junos Juniper 20.2-r2-s2 (including) 20.2-r2-s2 (including)
Junos Juniper 20.2-r2-s3 (including) 20.2-r2-s3 (including)
Junos Juniper 20.2-r3 (including) 20.2-r3 (including)
Junos Juniper 20.2-r3-s1 (including) 20.2-r3-s1 (including)
Junos Juniper 20.2-r3-s2 (including) 20.2-r3-s2 (including)
Junos Juniper 20.2-r3-s3 (including) 20.2-r3-s3 (including)
Junos Juniper 20.2-r3-s4 (including) 20.2-r3-s4 (including)
Junos Juniper 20.3 (including) 20.3 (including)
Junos Juniper 20.3-r1 (including) 20.3-r1 (including)
Junos Juniper 20.3-r1-s1 (including) 20.3-r1-s1 (including)
Junos Juniper 20.3-r1-s2 (including) 20.3-r1-s2 (including)
Junos Juniper 20.3-r2 (including) 20.3-r2 (including)
Junos Juniper 20.3-r2-s1 (including) 20.3-r2-s1 (including)
Junos Juniper 20.3-r3 (including) 20.3-r3 (including)
Junos Juniper 20.3-r3-s1 (including) 20.3-r3-s1 (including)
Junos Juniper 20.3-r3-s2 (including) 20.3-r3-s2 (including)
Junos Juniper 20.3-r3-s3 (including) 20.3-r3-s3 (including)
Junos Juniper 20.4 (including) 20.4 (including)
Junos Juniper 20.4-r1 (including) 20.4-r1 (including)
Junos Juniper 20.4-r1-s1 (including) 20.4-r1-s1 (including)
Junos Juniper 20.4-r2 (including) 20.4-r2 (including)
Junos Juniper 20.4-r2-s1 (including) 20.4-r2-s1 (including)
Junos Juniper 20.4-r2-s2 (including) 20.4-r2-s2 (including)
Junos Juniper 20.4-r3 (including) 20.4-r3 (including)
Junos Juniper 20.4-r3-s1 (including) 20.4-r3-s1 (including)
Junos Juniper 20.4-r3-s2 (including) 20.4-r3-s2 (including)
Junos Juniper 20.4-r3-s3 (including) 20.4-r3-s3 (including)
Junos Juniper 21.1 (including) 21.1 (including)
Junos Juniper 21.1-r1 (including) 21.1-r1 (including)
Junos Juniper 21.1-r1-s1 (including) 21.1-r1-s1 (including)
Junos Juniper 21.1-r2 (including) 21.1-r2 (including)
Junos Juniper 21.1-r2-s1 (including) 21.1-r2-s1 (including)
Junos Juniper 21.1-r2-s2 (including) 21.1-r2-s2 (including)
Junos Juniper 21.1-r3 (including) 21.1-r3 (including)
Junos Juniper 21.1-r3-s1 (including) 21.1-r3-s1 (including)
Junos Juniper 21.2 (including) 21.2 (including)
Junos Juniper 21.2-r1 (including) 21.2-r1 (including)
Junos Juniper 21.2-r1-s1 (including) 21.2-r1-s1 (including)
Junos Juniper 21.2-r1-s2 (including) 21.2-r1-s2 (including)
Junos Juniper 21.2-r2 (including) 21.2-r2 (including)
Junos Juniper 21.2-r2-s1 (including) 21.2-r2-s1 (including)
Junos Juniper 21.2-r2-s2 (including) 21.2-r2-s2 (including)
Junos Juniper 21.2-r3 (including) 21.2-r3 (including)
Junos Juniper 21.3 (including) 21.3 (including)
Junos Juniper 21.3-r1 (including) 21.3-r1 (including)
Junos Juniper 21.3-r1-s1 (including) 21.3-r1-s1 (including)
Junos Juniper 21.3-r1-s2 (including) 21.3-r1-s2 (including)
Junos Juniper 21.3-r2 (including) 21.3-r2 (including)
Junos Juniper 21.3-r2-s1 (including) 21.3-r2-s1 (including)
Junos Juniper 21.3-r2-s2 (including) 21.3-r2-s2 (including)
Junos Juniper 21.4 (including) 21.4 (including)
Junos Juniper 21.4-r1 (including) 21.4-r1 (including)
Junos Juniper 21.4-r1-s1 (including) 21.4-r1-s1 (including)
Junos Juniper 21.4-r1-s2 (including) 21.4-r1-s2 (including)
Junos Juniper 21.4-r2 (including) 21.4-r2 (including)
Junos Juniper 21.4-r2-s1 (including) 21.4-r2-s1 (including)
Junos Juniper 21.4-r2-s2 (including) 21.4-r2-s2 (including)
Junos Juniper 22.1-r1 (including) 22.1-r1 (including)
Junos Juniper 22.1-r1-s1 (including) 22.1-r1-s1 (including)
Junos Juniper 22.1-r1-s2 (including) 22.1-r1-s2 (including)

Extended Description

It is often convenient to serialize objects for communication or to save them for later use. However, deserialized data or code can often be modified without using the provided accessor functions if it does not use cryptography to protect itself. Furthermore, any cryptography would still be client-side security – which is a dangerous security assumption. Data that is untrusted can not be trusted to be well-formed. When developers place no restrictions on “gadget chains,” or series of instances and method invocations that can self-execute during the deserialization process (i.e., before the object is returned to the caller), it is sometimes possible for attackers to leverage them to perform unauthorized actions, like generating a shell.

Potential Mitigations

  • Make fields transient to protect them from deserialization.
  • An attempt to serialize and then deserialize a class containing transient fields will result in NULLs where the transient data should be. This is an excellent way to prevent time, environment-based, or sensitive variables from being carried over and used improperly.

References