Skip to content
OpenAdvisories

Weakness (CWE)

CWE-252: Unchecked Return Value

Base Draft

The product does not check the return value from a method or function.

How to prevent it (4 mitigations)
  1. Implementation

    Check the results of all functions that return a value and verify that the value is expected.

  2. Implementation

    For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].

  3. Implementation

    Ensure that you account for all possible return values from the function.

  4. Implementation

    When designing a function, make sure you return a value or throw an exception in case of an error.

Source: MITRE CWE-252

67 results · Clear filters · Feed

  • Medium 5.5

    FFmpeg through 9.0.2 NULL Pointer Dereference via aac_adtstoasc Bitstream Filter

    FFmpeg through 9.0.2 contains a NULL pointer dereference vulnerability in aac_adtstoasc_filter() that allows attackers to crash applications via oversized ADTS AAC packets. Attackers can supply a crafted file with a packet over 256 MB, overflowing the bit cou…

  • Medium 5.5

    FFmpeg before 8.1.3 and 9.x before 9.0.2 NULL Pointer Dereference via ff_hap_set_chunk_count()

    FFmpeg before 8.1.3 and 9.x before 9.0.2 contains a NULL pointer dereference vulnerability in ff_hap_set_chunk_count() in libavcodec/hap.c, where a shadowed return variable masks reallocation failures. Attackers can supply a crafted Hap video frame with an ov…

  • Medium 4.7

    FFmpeg through 9.0.2 NULL Pointer Dereference in JV Video Decoder

    FFmpeg through 9.0.2 contains a NULL pointer dereference vulnerability in libavcodec/jvdec.c that allows attackers to crash applications by supplying oversized JV video packets. Attackers can pass a roughly 268435460-byte packet through the libavcodec API, ov…

  • Medium 4.7

    FFmpeg through 9.0.2 NULL Pointer Dereference in MPEG Audio Decoder

    FFmpeg through 9.0.2 contains a NULL pointer dereference vulnerability in mp_decode_frame() in libavcodec/mpegaudiodec_template.c because init_get_bits() failure is ignored after a signed integer overflow. Attackers can pass an oversized packet to the mp3adu …

  • Medium 5.5

    FFmpeg through 9.0.2 NULL Pointer Dereference in EA TQI Decoder

    FFmpeg through 9.0.2 contains a NULL pointer dereference vulnerability in tqi_decode_frame() in libavcodec/eatqi.c, which ignores init_get_bits() failure after an integer overflow. Attackers can supply a crafted EA file with a pIQT chunk carrying a 2^28-byte …

  • Medium 5.5

    FFmpeg through 9.0.2 NULL Pointer Dereference in Bink Video Decoder

    FFmpeg through 9.0.2 contains a NULL pointer dereference vulnerability in the Bink video decoder because decode_frame() in libavcodec/bink.c ignores init_get_bits() failure. Attackers can supply a crafted Bink file with a frame of about 2^28 bytes, overflowin…

  • Medium 4.7

    FFmpeg through 9.0.2 NULL Pointer Dereference via Motion Pixels Decoder

    FFmpeg through 9.0.2 contains a NULL pointer dereference vulnerability in the Motion Pixels decoder because mp_decode_frame() ignores init_get_bits() failure. Attackers supplying a roughly 2^28-byte packet through the libavcodec API overflow the bit count, ca…

  • Medium 5.5

    FFmpeg through 9.0.2 VBLE Decoder NULL Pointer Dereference via vble_decode_frame()

    FFmpeg through 9.0.2 contains a NULL pointer dereference vulnerability in vble_decode_frame() in libavcodec/vble.c because it ignores init_get_bits() failure on oversized packets. Attackers can supply a crafted AVI file with a 268435452-byte VBLE frame, causi…

  • Medium 5.5

    FFmpeg through 9.0.2 NULL Pointer Dereference via TGV Decoder eatgv.c

    FFmpeg through 9.0.2 contains a NULL pointer dereference vulnerability in tgv_decode_inter() in libavcodec/eatgv.c that ignores init_get_bits() failure on oversized packets. Attackers can supply a crafted EA file with a kVGT frame followed by an fVGT inter fr…

  • Medium 5.5

    FFmpeg through 9.0.2 NULL Pointer Dereference in CLJR Video Decoder

    FFmpeg through 9.0.2 contains a NULL pointer dereference vulnerability in the Cirrus Logic AccuPak (CLJR) decoder in libavcodec/cljrdec.c because decode_frame() ignores init_get_bits() failure. Attackers can supply a crafted AVI file with a 2^28-byte CLJR fra…

  • Medium 5.5

    FFmpeg through 9.0.2 NULL Pointer Dereference in G.726 ADPCM Decoder

    FFmpeg through 9.0.2 contains a NULL pointer dereference vulnerability in g726_decode_frame() in libavcodec/g726.c because it ignores init_get_bits() failure on oversized packets. Attackers can supply a crafted AVI file with a 268435392-byte G.726 audio chunk…

  • Medium 6.3

    Echo: BodyDump can discard BodyLimit overflow errors for unknown-length requests

    Echo is a Go web framework. From 5.0.0 until 5.4.1, Echo v5's BodyDump middleware can discard a BodyLimit overflow error for an unknown-length request when BodyDump's capture limit is below the BodyLimit threshold. BodyDump drains the remaining body while ign…

  • Medium 6.3

    Crux Agent silently fails SKA preshared key rotation when SHA-512 peering is negotiated

    Crux Agent from 1.9.0 before 2.0.3 uses the full SKA bilocation key as the WireGuard preshared key. When a peering session negotiates use of SHA-512, the key produced is 64 bytes instead of the 32 bytes WireGuard requires. The agent does not validate this siz…

  • Medium 4.8

    Application denial of service and data truncation via unchecked BSON append failures in MongoDB PHP Driver

    The BSON encoder in the MongoDB PHP Driver does not check some return values after a document exceeds libbson's size limit. This can leave the encoder in an invalid state. An unauthenticated actor who can cause an affected application to encode an unusually l…

  • Medium 6.3

    snipe-it before 8.7.0 Data Loss via Failed Image Write

    Snipe-IT versions <= 8.6.3 (fixed in 8.7.0) do not check the return value of storage write operations in ImageUploadRequest::handleImages(). Because Laravel's default disk mode does not throw on failure, a silently failed Storage::disk('public')->put(...) cal…

  • Medium 5.3

    Nokogiri before 1.19.1 Unchecked Return Value canonicalize

    Nokogiri versions before 1.19.1 fail to check the return value from xmlC14NExecute in the canonicalize method, returning an empty string on failure instead of raising an exception. Attackers can exploit this to bypass signature validation in downstream SAML l…

  • Medium 6.5

    tor before 0.4.9.9 was prone to a NULL write after free when sending a CONFLUX_SWITCH cell fails. The return value of r…

  • Medium 4.3

    MyBB: Buddy list corruption

    MyBB is free and open source forum software. Prior to 1.8.40, the User CP Buddy/Ignore List component does not validate reciprocal buddy-list updates correctly. The usercp.php?action=do_editlists delete handler removes the selected entry from the acting user'…

  • Medium 5.5

    ImageMagick: Heap Buffer Over-Write in MIFF encoder when using LZMA compression

    ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 6.9.13-48 and 7.1.2-23, when using LZMA compression in the MIFF encoder an out of bounds write can occur due to a missing check. This issue has be…

  • Medium 4.8

    Unchecked return value for some Intel(R) QAT software drivers for Windows before version 1.13 within Ring 3: User Appli…

  • Medium 5.5

    uutils coreutils chmod False Success Exit Code in Recursive Mode

    The recursive mode (-R) of the chmod utility in uutils coreutils incorrectly handles exit codes when processing multiple files. The final return value is determined solely by the success or failure of the last file processed. This allows the command to return…

  • Medium 5.3

    nimiq/core-rs-albatross: Panic in history index request handlers when a full node runs without the history index

    nimiq/core-rs-albatross is a Rust implementation of the Nimiq Proof-of-Stake protocol based on the Albatross consensus algorithm. Prior to version 1.3.0, two peer-facing consensus request handlers assume that the history index is always available and call blo…

  • Medium 6.5

    FreeRDP: Progressive Codec Quant BYTE Underflow - UB + CPU DoS

    FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to version 3.24.2, progressive_decompress_tile_upgrade() detects a mismatch via progressive_rfx_quant_cmp_equal() but only emits WLog_WARN, execution continues. The wrapped value (247) is …

  • Medium 6.5

    Kirby CMS through 5.1.4 allows an authenticated user with 'Editor' permissions to cause a persistent Denial of Service …

  • Medium 6.5

    A potential vulnerability was reported in the BIOS of L13 Gen 6, L13 Gen 6 2-in-1, L14 Gen 6, and L16 Gen 2 ThinkPads w…

  • Medium 5.5

    NULL Pointer Dereference in iccDEV XML Tag Parser

    iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of ICC color management profiles. Prior to version 2.3.1.2, iccDEV is vulnerable to NULL pointer dereference via the XML tag parser. This issue has been…

  • Medium 5.5

    NULL Pointer Dereference in iccDEV XML Calculator Parser

    iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of ICC color management profiles. Prior to version 2.3.1.2, iccDEV is vulnerable to NULL pointer dereference via the XML calculator parser. This issue h…

  • Medium 5.5

    NULL Pointer Dereference in iccDEV Signature Parser

    iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of ICC color management profiles. Prior to version 2.3.1.2, iccDEV is vulnerable to NULL pointer dereference via the signature parser. This issue has be…

  • Medium 5.5

    NULL Pointer Dereference in iccDEV Unknown Tag Parser

    iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of ICC color management profiles. Prior to version 2.3.1.2, iccDEV is vulnerable to NULL pointer dereference via an unknown tag parser. This issue has b…

  • Medium 5.5

    iccDEV ToneMap Writer has NULL Pointer Member Call

    iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of International Color Consortium (ICC) color management profiles. Versions prior to 2.3.1.2 have a NULL pointer member call vulnerability. This vulnera…

  • Medium 5.1

    Wazuh NULL pointer dereference in fim_alert line 666

    Wazuh is a free and open source platform used for threat prevention, detection, and response. From version 3.7.0 to before 4.12.0, fim_alert() implementation does not check whether oldsum->md5 is NULL or not before dereferencing it. A compromised agent can ca…

  • Medium 6.9

    Wazuh vulnerable to NULL pointer dereference in DecodeCiscat

    Wazuh is a free and open source platform used for threat prevention, detection, and response. Prior to 4.11.0, DecodeCiscat() implementation does not check the return the value of cJSON_GetObjectItem() for a possible NULL value in case of an error. A compromi…

  • Medium 6.9

    Wazuh vulnerable to NULL pointer dereference in fim_fetch_attributes_state

    Wazuh is a free and open source platform used for threat prevention, detection, and response. Prior to 4.11.0, fim_fetch_attributes_state() implementation does not check whether time_string is NULL or not before calling strlen() on it. A compromised agent can…

  • Medium 6.9

    Wazuh vulnerable to NULL pointer dereference in fim_alert line 712

    Wazuh is a free and open source platform used for threat prevention, detection, and response. Prior to 4.11.0, fim_alert() implementation does not check whether the return value of ctime_r is NULL or not before calling strdup() on it. A compromised agent can …

  • Medium 6.9

    Wazuh fillData NULL pointer dereference causes analysisd crash

    Wazuh is a free and open source platform used for threat prevention, detection, and response. fillData() implementation does not check whether value is NULL or not before calling os_strdup() on it. A compromised agent can cause a crash of analysisd by sending…

  • Medium 4.9

    An unchecked return value in Ivanti Connect Secure before 22.7R2.9 or 22.8R2, Ivanti Policy Secure before 22.7R1.6, Iva…

  • Medium 6.9

    ModSecurity's Insufficient Return Value Handling can Lead to XSS and Source Code Disclosure

    ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. In versions 2.9.11 and below, an attacker can override the HTTP response’s Content-Type, which could lead to several issues depending on the HTTP sc…

  • Medium 5.9

    Denial of Service (DoS) vulnerabilitiey in Zigbee library

    The Ember ZNet stack’s packet buffer manager may read out of bound memory leading to an assert, causing a Denial of Service (DoS).

  • Medium 5.4

    Wago: Vulnerability in libwagosnmp

    An attacker with low privileges can manipulate the requested memory size, causing the application to use an invalid memory area. This could lead to a crash of the application but it does not affected other applications.

  • Medium 4.0

    list_item_verbose in tar/util.c in libarchive through 3.7.7 does not check an strftime return value, which can lead to …