/

CVE-2026-88344

Severity:

HIGH RISK

(7.5)

Out-of-Bounds Read (CWE-22) in flatcc Schema Lexer Bug

CVE-2026-88344

Awaiting Analysis

Vulnerability type

Category:

Out-of-Bounds Read

CWE:

CWE-22

Impact:

Application Crash and Denial of Service

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A boundary-handling flaw in the flatcc schema lexer can read one byte beyond an exact-length schema buffer when the buffer ends with a digit. A specially crafted schema may trigger an application crash, causing denial of service wherever untrusted schemas are parsed.

Affected context

The issue occurs in flatcc schema parsing when all of the following conditions are present:

  • The schema buffer is provided at its exact length without an additional terminating byte.
  • The final byte is a decimal digit.
  • The lexer processes that digit as part of an integer token.

Systems that parse schemas from untrusted files, uploads, repositories, or network-controlled sources may be exposed to the condition.

Exploit preconditions

  • Attack surface: The flatcc schema lexer and any application that invokes it
  • Required access: Ability to supply or influence a schema buffer
  • Trigger point: Integer digit scanning near the end of an exact-length buffer
  • Why exploitation is possible: The digit-scanning loop advances beyond the valid buffer boundary before checking whether more input remains

Why this happens

The underlying bug is an unchecked boundary condition in a lexer loop. When a sequence of digits reaches the final valid byte, the scanner advances its pointer and dereferences memory beyond the supplied buffer instead of stopping at the buffer boundary.

This behavior is characteristic of an out-of-bounds read and can expose adjacent memory or terminate the process when the invalid access is detected. The supplied vulnerability mapping identifies CWE-22; however, the described memory-safety behavior is more directly associated with out-of-bounds read classifications such as CWE-125.

Potential impact

  • The application may crash during schema parsing.
  • A service may become unavailable when repeatedly processing crafted schemas.
  • Parser worker resources could be consumed by failed or repeated processing attempts.
  • Diagnostic data or adjacent memory may be exposed in environments where the invalid read is observable.

General mitigation guidance

Mitigation generally focuses on making lexer boundary checks explicit and treating schema buffers as bounded data rather than implicitly terminated strings.

Common defensive patterns include:

  • Checking the current pointer against the buffer end before every character read.
  • Handling end-of-input while scanning numeric tokens.
  • Preserving buffer length information throughout parsing.
  • Rejecting malformed or incomplete schemas before deeper processing.
  • Parsing schemas in isolated, least-privileged processes when inputs are untrusted.
  • Reducing input trust through allowlisted sources, validation, and resource limits.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis that flags pointer increments followed by dereferences without end-bound checks.
  • Code review of lexer loops that scan digits, identifiers, or quoted values.
  • Boundary-focused tests using empty, exact-length, truncated, and delimiter-free buffers.
  • AddressSanitizer, UndefinedBehaviorSanitizer, and fuzzing campaigns targeting schema parsing.
  • Policy enforcement requiring length-aware parsing APIs for externally supplied buffers.
  • Automated review tools that identify potential off-by-one reads and missing end-of-input handling.

Sources

SourceLink
github.comgithub.com/dvidelabs/flatcc/issues/384
github.comgithub.com/jimjag/flatcc/commit/c1dcc8ecd1a74b1e9e724ec7dc98828a5c95528e

Frequently asked

questions

It can be remotely relevant when an application accepts schemas through a network service, upload feature, repository integration, or other attacker-influenced channel. The vulnerability itself is triggered during local parsing.

An attacker generally needs the ability to provide or modify a schema that is later processed by the vulnerable lexer. No special operating-system privileges are inherently required.

Ensure every lexer read is bounded by the supplied buffer length, including reads performed while scanning a final numeric token. Reject malformed input before processing continues.

Use length-aware parsing, add exact-boundary and truncation tests, fuzz schema inputs, and run memory-safety instrumentation during development and continuous integration.

Find out what's already
exploitable in your codebase.