An Improper Neutralization of Delimiters vulnerability in the UI of Juniper Networks Junos OS and Junos OS Evolved allows a local, authenticated attacker with high privileges to modify the system configuration.
A user with limited configuration and commit permissions, using a specifically crafted annotate configuration command, can change any part of the device configuration.
This issue affects:
Junos OS:
- all versions before 22.2R3-S7,
- 22.4 versions before 22.4R3-S7,
- 23.2 versions before 23.2R2-S4,
- 23.4 versions before 23.4R2-S4,
- 24.2 versions before 24.2R2-S1,
- 24.4 versions before 24.4R1-S2, 24.4R2;
Junos OS Evolved:
-
all versions before 22.4R3-S7-EVO,
-
23.2-EVO versions before 23.2R2-S4-EVO,
-
23.4-EVO versions before 23.4R2-S5-EVO,
-
24.2-EVO versions before 24.2R2-S1-EVO
-
24.4-EVO versions before 24.4R2-EVO.
Weakness
The product does not neutralize or incorrectly neutralizes delimiters.
Potential Mitigations
- Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
References