CWE-1335Base

Incorrect Bitwise Shift of Integer

Draft in the CWE catalog · 4 CVEs mapped

4
CVEs mapped
6.7
Median CVSS
What it is

An integer value is specified to be shifted by a negative amount or an amount greater than or equal to the number of bits contained in the value causing an unexpected or indeterminate result.

Recent examples
6.5cvss
CVE-2026-4426

CVE-2026-4426 - MEDIUM Severity Vulnerability

A flaw was found in libarchive. An Undefined Behavior vulnerability exists in the zisofs decompression logic, caused by improper validation of a field (`pz_log2_bs`) read from ISO9660 Rock Ridge extensions. A remote attacker can exploit this by supplying a specially crafted ISO file. This can lead to incorrect memory allocation and potential application crashes, resulting in a denial-of-service (DoS) condition.

MEDIUMno explanation yet
0%
epss
6.9cvss
CVE-2025-32029

ts-asn1-der has Incorrect DER Encoding of Numbers Leading to Denial of Service and Incorrect Value Representation

ts-asn1-der is a collection of utility classes to encode ASN.1 data following DER rule. Incorrect number DER encoding can lead to denial on service for absolute values in the range 2**31 -- 2**32 - 1. The arithmetic in the numBitLen didn't take into account that values in this range could result in a negative result upon applying the >> operator, leading to an infinite loop. The issue is patched in version 1.0.4. If upgrading is not an option, the issue can be mitigated by validating inputs to Asn1Integer to ensure that they are not smaller than -2**31 + 1 and no larger than 2**31 - 1.

MEDIUMno explanation yet
0%
epss
7.8cvss
CVE-2023-52810

CVE-2023-52810 - HIGH Severity Vulnerability

In the Linux kernel, the following vulnerability has been resolved: fs/jfs: Add check for negative db_l2nbperpage l2nbperpage is log2(number of blks per page), and the minimum legal value should be 0, not negative. In the case of l2nbperpage being negative, an error will occur when subsequently used as shift exponent. Syzbot reported this bug: UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:799:12 shift exponent -16777216 is negative

HIGHno explanation yet
0%
epss
The record
Technical detail
CWE ID
CWE-1335
Abstraction
Base
Structure
Simple
Status
Draft