CVE Vulnerabilities


Improper Check for Unusual or Exceptional Conditions

Published: Apr 10, 2019 | Modified: Feb 05, 2021
CVSS 3.x
CVSS 2.x
7.5 HIGH

When configuring a stateless firewall filter in Junos OS, terms named using the format internal-n (e.g. internal-1, internal-2, etc.) are silently ignored. No warning is issued during configuration, and the config is committed without error, but the filter criteria will match all packets leading to unexpected results. Affected releases are Juniper Networks Junos OS: All versions prior to and including 12.3; 14.1X53 versions prior to 14.1X53-D130, 14.1X53-D49; 15.1 versions prior to 15.1F6-S12, 15.1R7-S4; 15.1X49 versions prior to 15.1X49-D161, 15.1X49-D170; 15.1X53 versions prior to 15.1X53-D236, 15.1X53-D496, 15.1X53-D69; 16.1 versions prior to 16.1R7-S4, 16.1R7-S5; 16.2 versions prior to 16.2R2-S9; 17.1 versions prior to 17.1R3; 17.2 versions prior to 17.2R1-S8, 17.2R3-S1; 17.3 versions prior to 17.3R3-S4; 17.4 versions prior to 17.4R1-S7, 17.4R2-S3; 18.1 versions prior to 18.1R2-S4, 18.1R3-S4; 18.2 versions prior to 18.2R1-S5, 18.2R2-S1; 18.2X75 versions prior to 18.2X75-D40; 18.3 versions prior to 18.3R1-S3; 18.4 versions prior to 18.4R1-S1, 18.4R1-S2.


The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.

Affected Software

Name Vendor Start Version End Version
Junos Juniper 15.1 (including) 15.1 (including)
Junos Juniper 15.1-f1 (including) 15.1-f1 (including)
Junos Juniper 15.1-f2 (including) 15.1-f2 (including)
Junos Juniper 15.1-f3 (including) 15.1-f3 (including)
Junos Juniper 15.1-f4 (including) 15.1-f4 (including)
Junos Juniper 15.1-f5 (including) 15.1-f5 (including)
Junos Juniper 15.1-f6 (including) 15.1-f6 (including)
Junos Juniper 15.1-r1 (including) 15.1-r1 (including)
Junos Juniper 15.1-r2 (including) 15.1-r2 (including)
Junos Juniper 15.1-r3 (including) 15.1-r3 (including)
Junos Juniper 15.1-r4 (including) 15.1-r4 (including)
Junos Juniper 15.1-r5 (including) 15.1-r5 (including)
Junos Juniper 15.1-r6 (including) 15.1-r6 (including)
Junos Juniper 15.1f6-s1-f6 (including) 15.1f6-s1-f6 (including)
Junos Juniper 15.1f6-s2-f6 (including) 15.1f6-s2-f6 (including)
Junos Juniper 15.1f6-s4-f6 (including) 15.1f6-s4-f6 (including)
Junos Juniper 15.1f6-s5-f6 (including) 15.1f6-s5-f6 (including)
Junos Juniper 15.1f6-s6-f6 (including) 15.1f6-s6-f6 (including)
Junos Juniper 15.1f6-s7-f6 (including) 15.1f6-s7-f6 (including)
Junos Juniper 15.1f6-s8-f6 (including) 15.1f6-s8-f6 (including)
Junos Juniper 15.1f6-s9-f6 (including) 15.1f6-s9-f6 (including)
Junos Juniper 15.1f6-s10-f6 (including) 15.1f6-s10-f6 (including)
Junos Juniper 15.1f6-s11-f6 (including) 15.1f6-s11-f6 (including)

Extended Description

The programmer may assume that certain events or conditions will never occur or do not need to be worried about, such as low memory conditions, lack of access to resources due to restrictive permissions, or misbehaving clients or components. However, attackers may intentionally trigger these unusual conditions, thus violating the programmer’s assumptions, possibly introducing instability, incorrect behavior, or a vulnerability. Note that this entry is not exclusively about the use of exceptions and exception handling, which are mechanisms for both checking and handling unusual or unexpected conditions.

Potential Mitigations

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • Choose languages with features such as exception handling that force the programmer to anticipate unusual conditions that may generate exceptions. Custom exceptions may need to be developed to handle unusual business-logic conditions. Be careful not to pass sensitive exceptions back to the user (CWE-209, CWE-248).
  • Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
  • If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
  • Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
  • Exposing additional information to a potential attacker in the context of an exceptional condition can help the attacker determine what attack vectors are most likely to succeed beyond DoS.
  • 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.