Skip to content
OpenAdvisories

Weakness (CWE)

CWE-193: Off-by-one Error

Base Draft

A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.

How to prevent it (1 mitigation)
  1. Implementation

    When copying character arrays or using character manipulation methods, the correct size parameter must be used to account for the null terminator that needs to be added at the end of the array. Some examples of functions susceptible to this weakness in C include strcpy(), strncpy(), strcat(), strncat(), printf(), sprintf(), scanf() and sscanf().

Source: MITRE CWE-193

168 results · Feed

  • High 8.8

    Microsoft Office Excel Remote Code Execution Vulnerability

    Heap-based buffer overflow in Microsoft Office Excel allows an unauthorized attacker to execute code over a network.

  • Medium 6.5

    Microsoft Office Word Information Disclosure Vulnerability

    Off-by-one error in Microsoft Office Word allows an unauthorized attacker to disclose information over a network.

  • Medium 5.5

    Windows Container Isolation FS Filter Driver (unionfs.sys) Elevation of Privilege Vulnerability

    Off-by-one error in Windows Container Isolation FS Filter Driver (unionfs.sys) allows an authorized attacker to elevate privileges locally.

  • Medium 5.1

    Off-by-one error in the MigTD's vmcall_raw transport for the Intel(R) TDX Migration Trust Domain (MigTD) within Ring 0:…

  • Medium 5.3

    An off-by-one error in certain ASUS Router firmware allows an unauthenticated nearby user to send a packet with a speci…

  • Medium 5.1

    compose-lint: `fix --apply` can delete a line the user did not select, including a security setting

    compose-lint is a Docker Compose security linter that identifies dangerous misconfigurations before deployment. From 0.9.0 until 0.18.0, compose-lint's YAML parser recognizes lone carriage returns and Unicode line separators U+0085, U+2028, and U+2029 as line…

  • Medium 5.3

    FreeSWITCH: Pre-authentication out-of-bounds writes in mod_xml_rpc WebSocket frame parsing

    FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a software implementation that runs on any commodity hardware. Prior to 1.11.2, ws_read_frame() unmasked a WebSocket payload by iterating w…

  • Medium 5.9

    FreeSWITCH: Off-by-one heap write in core XML serialization of four-byte UTF-8 sequences

    FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a software implementation that runs on any commodity hardware. Prior to 1.11.2, switch_xml_ampencode() reserved only ten bytes for the wide…

  • High 7.5

    psqlODBC ODBC escape parser stack buffer overflow

    The psqlODBC parser for ODBC escape sequences in application SQL text writes the argument offsets of a {fn} escape into a fixed 16-entry stack array without a bound and does not initialize the array. An escape with too many arguments overflows the stack, and …

  • Medium 6.1

    libpff through 20260926 Heap Out-of-Bounds Read via libpff_table_read_6c_record_entries

    libpff through 20260926 contains an off-by-one bounds check in libpff_table_read_6c_record_entries that allows attackers to trigger a heap out-of-bounds read via crafted 6c table record entries. Attackers can supply crafted PST, OST or PAB files to applicatio…

  • Medium 6.5

    vLLM: Out-of-vocabulary prompt token id passes input validation and triggers a CUDA device-side assert (engine crash / DoS)

    vLLM is an inference and serving engine for large language models. Prior to 0.32.0, vllm/tokenizers/hf.py computes max_token_id with an off-by-one upper bound, allowing a pre-tokenized prompt ID equal to the vocabulary size to pass validation. For a tensor-pa…

  • Medium 5.3

    Mod_qos: query truncation during json body merging permits security-rule bypass

    A flaw was found in mod_qos. An off-by-one pointer calculation error occurs when merging request body parameters with an existing URL query, which truncates the query string during security evaluation while leaving the actual request unchanged. An unauthentic…

  • Medium 4.3

    IBM MQ Buffer Overflow

    IBM MQ could allow an authenticated attacker to cause potential process instability due to an off-by-one buffer overflow when processing specially crafted object names.

  • Medium 6.1

    unarr through 1.1.1 Off-by-One Heap Buffer Overflow via tar_get_name

    unarr through 1.1.1 contains an off-by-one heap-based buffer overflow in tar_get_name() in tar/parse-tar.c, reachable through the ar_entry_get_name() API. Attackers can supply a crafted TAR archive with a full ustar prefix and name to write a NUL byte past th…

  • High 8.8

    Microsoft Office Word Remote Code Execution Vulnerability

    Off-by-one error in Microsoft Office Word allows an unauthorized attacker to execute code over a network.

  • Medium 6.5

    Remote DoS via receive-side kernel TLS

    TLS 1.3 embeds the actual record type as the last non-zero byte of the decrypted payload, optionally followed by zero padding. The code which searches for the inner record type had an off-by-one bug which could be triggered by an invalid frame, leading to an …

  • Low 3.6

    Mini-XML 4.0.0 through 4.0.6 Stack Out-of-Bounds Write via mxml_strtod()

    Mini-XML 4.0.0 through 4.0.6 contains an off-by-one stack out-of-bounds write in mxml_strtod() when the locale decimal point is not '.'. Attackers can supply XML with a 63-digit REAL value followed by '.' to write a NUL byte past the 64-byte stack buffer, cor…

  • High 8.8

    Microsoft Office Excel Remote Code Execution Vulnerability

    Heap-based buffer overflow in Microsoft Office Excel allows an unauthorized attacker to execute code over a network.

  • High 8.8

    Microsoft Office Visio Remote Code Execution Vulnerability

    Heap-based buffer overflow in Microsoft Office Visio allows an unauthorized attacker to execute code over a network.

  • Medium 5.8

    OWASP Coraza WAF: jsDecode Off-by-One in Octal Escape Handling Enables WAF Bypass

    OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. From 3.0.0 until 3.8.0, the t:jsDecode transformation in internal/transformations/js_decode.go:64-70 includes the backslash in the octal buffer, causing ParseInt to fail and…

  • Medium 5.3

    wstrncat() unsigned integer underflow leads to an off-by-one null write in wolfSSH on non-Windows platforms

    Unsigned integer underflow in wstrncat() in src/port.c in wolfSSL wolfSSH from v1.4.11 through v1.5.0 on non-Windows platforms allows an authenticated remote attacker to write one out-of-bounds null byte past the end of a stack buffer by sending a crafted SFT…

  • High 7.1

    In NTFS-3G before 2026.7.7, a heap buffer overflow exists in ntfs_decompress() in compress.c that allows an attacker to…

  • Low 2.5

    In ssh-keygen in OpenSSH before 10.6, certificates could have incorrect expiration times because of Daylight Saving mis…

  • Medium 5.4

    Sssd: sssd: access control bypass via improper ldap shadow expiration check

    A flaw was found in SSSD. When configured to enforce account expiration using LDAP (Lightweight Directory Access Protocol) shadow attributes, SSSD fails to treat an expiration value of zero as an expired account. A user with valid credentials for an expired a…

  • Medium 5.3

    DHCP client option walk drifts one byte per skipped option, reading past the received message and past the saved options buffer

    In Eclipse ThreadX NetX Duo versions 6.0 through 6.5.2.202603a, the DHCP client's option walk advances its offset one byte less than its read pointer for every option it skips. A DHCP server, or any host on the link that answers first, can make the client rea…

  • High 7.3

    Trusted Domain Project OpenDMARC DMARC Record opendmarc_util.c opendmarc_util_cleanup off-by-one

    A vulnerability was detected in Trusted Domain Project OpenDMARC up to 1.4.2. Affected by this vulnerability is the function opendmarc_util_cleanup in the library libopendmarc/opendmarc_util.c of the component DMARC Record Parser. Performing a manipulation re…

  • High 7.3

    Trusted Domain Project OpenDKIM Decoder util.c dkim_qp_decode off-by-one

    A vulnerability was detected in Trusted Domain Project OpenDKIM up to 2.11.0. Affected is the function dkim_qp_decode of the file util.c of the component Decoder. The manipulation results in off-by-one. The attack may be performed from remote. The exploit is …

  • Medium 6.9

    Off-by-one Error, Out-of-bounds Write vulnerability in RTI Connext Professional (Core Libraries) allows Overflow Buffers.

    Off-by-one Error, Out-of-bounds Write vulnerability in RTI Connext Professional (Core Libraries) allows Overflow Buffers. This issue affects Connext Professional: from 7.4.0 before 7.7.0.1, from 7.0.0 before 7.3.1.6.

  • Medium 6.5

    Netdata: Streaming protocol chart slot guard off-by-one allows ~16 GiB allocation request, crashing parent agent

    Netdata is an open source observability tool. Prior to 2.10.4, an authenticated child agent can send an oversized CHART SLOT value that str2ull_encoded passes to pluginsd_rrdset_cache_put_to_slot in src/plugins.d/pluginsd_internals.h. The accepted slot drives…

  • Medium 5.5

    Imager versions before 1.036 for Perl disclose uninitialised heap memory reading a paletted image with pixel indexes past its colour map in i_gpix_p and i_glin_p

    Imager versions before 1.036 for Perl disclose uninitialised heap memory reading a paletted image with pixel indexes past its colour map in i_gpix_p and i_glin_p. The palette is allocated uninitialised, and only the entries a reader adds count as populated. T…

  • Medium 6.5

    snappy-java through 1.1.10.8 Buffer Overflow via typed uncompress methods

    snappy-java through 1.1.10.8 contains a buffer overflow vulnerability in typed Snappy.uncompress*Array methods that allocate output arrays by dividing uncompressed length by element size but pass the undivided length to native code. Attackers controlling comp…

  • Medium 5.5

    ZITADEL: Improper Role Revocation on Granted Projects during Multiple Role Deletions

    ZITADEL is an open source identity management platform. Prior to version 4.16.0, a bug in how ZITADEL updates permissions when multiple project roles are deleted at the same time can cause some user permissions to be missed. This issue specifically affects Us…

  • Medium 4.4
    CVE-2026-90781 Public exploit

    alsa-lib through 1.2.16.1 Off-by-One Stack Buffer Overflow in __snd_ctl_ascii_elem_id_parse()

    alsa-lib through 1.2.16.1 contains a stack buffer overflow in the __snd_ctl_ascii_elem_id_parse() function that writes one byte past a 64-byte buffer when parsing a name= field with 64 or more characters. Attackers can supply a long control-element identifier…

  • High 7.8

    Microsoft Excel Remote Code Execution Vulnerability

    Stack-based buffer overflow in Microsoft Office Excel allows an unauthorized attacker to execute code locally.

  • Medium 5.5

    Win32k Information Disclosure Vulnerability

    Out-of-bounds read in Windows Win32K allows an authorized attacker to disclose information locally.

  • High 8.1

    D-Link DIR-605 L2TP Control Message tunnel.c tunnel_set_params off-by-one

    A vulnerability was identified in D-Link DIR-605 B1v202WWB03. This issue affects the function tunnel_set_params of the file progs.gpl/pppd.alpha/l2tp/tunnel.c of the component L2TP Control Message Parser. Such manipulation of the argument peer_hostname  leads…

  • Low 2.3

    OpenVPN 2.5.0 through 2.7.6 on Windows using the tap-windows6 driver allows attackers to trigger an out-of-bounds write…

  • Medium 6.9

    PJSIP: SIP message header buffer overflow

    PJSIP is a free and open source multimedia communication library written in C. Prior to commit d6a0e7f, a buffer overflow can occur in pjsip_generic_array_hdr_print() in pjsip/src/pjsip/sip_msg.c, the function that serializes generic array headers (such as Al…

  • Medium 6.1

    MOOS core-moos through 10.4.0 Off-by-One Buffer Overflow in Serial Telegram Handling

    MOOS core-moos through 10.4.0 contains a buffer overflow vulnerability in CMOOSSerialPort::GetTelegram() that writes a NUL terminator one byte past the serial telegram stack buffer. Attackers controlling the serial line can send a full-length telegram to trig…

  • Medium 5.4

    Off-by-one out-of-bounds NUL write in Zephyr LwM2M JSON string parser

    The LwM2M JSON content formatter's get_string() in subsys/net/lib/lwm2m/lwm2m_rw_json.c copies a parsed JSON string into a caller-supplied buffer and NUL-terminates it. The length guard used if (string_length > buflen), which accepts a string whose length is …