Skip to content
OpenAdvisories

Weakness (CWE)

CWE-241: Improper Handling of Unexpected Data Type

Base Draft

The product does not handle or incorrectly handles when a particular element is not the expected type, e.g. it expects a digit (0-9) but is provided with a letter (A-Z).

How to prevent it (2 mitigations)
  1. Implementation

    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.

  2. Implementation

    Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.

Source: MITRE CWE-241

18 results · Clear filters · Feed

  • Medium 6.5

    Tiptap for PHP < 2.1.1 DoS via Malformed href Attribute

    Tiptap for PHP before version 2.1.1 contains an input validation vulnerability that allows authenticated attackers to cause a denial of service by submitting Tiptap JSON with the attrs.href field set to an array instead of a string, causing an unhandled TypeE…

  • Medium 5.7

    Nextcloud Calendar attachments of local files are offered to downloaded

    Nextcloud Calendar is a calendar app for Nextcloud. Prior to 4.7.17 and 5.2.4, when a malicious user creates a calendar event with a crafted attachment that links to a download link of a file on the same Nextcloud server, the file would be downloaded without …

  • Medium 5.0

    Improper input validation in Satellite Management Controller (SMC) may allow an attacker with privileges to manipulate …

  • Medium 5.0

    Improper input validation in Satellite Management Controller (SMC) may allow an attacker with privileges to use certain…

  • Medium 6.9

    HP LaserJet MFP M232-M237 Printer Series - Potential Denial of Service

    The HP LaserJet MFP M232-M237 Printer Series may be vulnerable to a denial of service attack when a specially crafted request message is sent via Internet Printing Protocol (IPP).

  • Medium 6.9

    Certain HP LaserJet Pro Printers – Potential Denial of Service

    Certain HP LaserJet Pro printers may potentially experience a denial of service when a user sends a raw JPEG file to the printer via IPP (Internet Printing Protocol).

  • Medium 5.3

    Certain HP LaserJet Printers – Potential Denial of Service

    Certain HP LaserJet printers may potentially experience a denial of service when a user sends a raw JPEG file to the printer. The printer displays a “JPEG Unsupported” message which may not clear, potentially blocking queued print jobs.

  • Medium 4.6

    Nextcloud Calendar's event create can create attachments that link to other websites

    Nextcloud Calendar is a calendar app for Nextcloud. Authenticated users could create an event with manipulated attachment data leading to a bad redirect for participants when clicked. It is recommended that the Nextcloud Calendar App is upgraded to 4.6.8 or 4…

  • Medium 5.3

    Dell PowerScale OneFS versions 8.2.x through 9.7.0.2 contains an improper handling of unexpected data type vulnerabilit…

  • Medium 6.5

    Insufficient argument checking in Secure state Entry functions in software using Cortex-M Security Extensions (CMSE), t…

  • Medium 5.3

    Libnbd: crash or misbehaviour when nbd server returns an unexpected block size

    A flaw was found in libnbd. A server can reply with a block size larger than 2^63 (the NBD spec states the size is a 64-bit unsigned value). This issue could lead to an application crash or other unintended behavior for NBD clients that doesn't treat the retu…

  • Medium 5.8

    Junos OS: ACX Series: IPv6 firewall filter is not installed in PFE when "from next-header ah" is used

    An Improper Handling of Unexpected Data Type vulnerability in IPv6 firewall filter processing of Juniper Networks Junos OS on the ACX Series devices will prevent a firewall filter with the term 'from next-header ah' from being properly installed in the packet…

  • Medium 5.9

    Junos OS and Junos OS Evolved: RPD core upon receipt of a specific EVPN route by a BGP route reflector in an EVPN environment

    Due to the Improper Handling of an Unexpected Data Type in the processing of EVPN routes on Juniper Networks Junos OS and Junos OS Evolved, an attacker in direct control of a BGP client connected to a route reflector, or via a machine in the middle (MITM) att…

  • Medium 6.5

    A single malformed IEEE 802.15.4 (Zigbee) frame makes the TRÅDFRI gateway unresponsive, such that connected lighting ca…

  • Medium 4.0

    Cisco Firepower Threat Defense Software Security Intelligence DNS Feed Bypass Vulnerability

    A vulnerability in the Security Intelligence feed feature of Cisco Firepower Threat Defense (FTD) Software could allow an unauthenticated, remote attacker to bypass the Security Intelligence DNS feed. This vulnerability is due to incorrect feed update process…

  • Medium 5.5

    Junos OS and Junos OS Evolved: In a BGP rib-sharding scenario when a certain CLI command is executed the rpd process might crash

    An Improper Handling of Unexpected Data Type vulnerability in the Routing Protocol Daemon (rpd) of Juniper Networks Junos OS and Junos OS Evolved allows a locally authenticated attacker with low privileges to cause a Denial of Service (DoS). Continued executi…

  • Medium 4.7

    Junos OS: EX4300: Stateless firewall policer fails to discard traffic

    Improper Handling of Unexpected Data in the firewall policer of Juniper Networks Junos OS on EX4300 switches allows matching traffic to exceed set policer limits, possibly leading to a limited Denial of Service (DoS) condition. When the firewall policer disca…

  • Medium 6.5

    Junos OS: EX4300: FPC crash upon receipt of specific frames on an interface without L2PT or dot1x configured

    A vulnerability due to the improper handling of direct memory access (DMA) buffers on EX4300 switches on Juniper Networks Junos OS allows an attacker sending specific unicast frames to trigger a Denial of Service (DoS) condition by exhausting DMA buffers, cau…