CVE-2026-2903
Received Received - Intake
Null Pointer Dereference in skvadrik re2c Local Function

Publication date: 2026-02-22

Last updated on: 2026-04-29

Assigner: VulDB

Description
A flaw has been found in skvadrik re2c up to 4.4. Impacted is the function check_and_merge_special_rules of the file src/parse/ast.cc. This manipulation causes null pointer dereference. The attack can only be executed locally. The exploit has been published and may be used. Patch name: febeb977936f9519a25d9fbd10ff8256358cdb97. It is suggested to install a patch to address this issue.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-22
Last Modified
2026-04-29
Generated
2026-06-16
AI Q&A
2026-02-22
EPSS Evaluated
2026-06-14
NVD
EUVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
skvadrik re2c to 4.4 (inc)
skvadrik re2c From 4.0 (inc) to 4.4 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-476 The product dereferences a pointer that it expects to be valid but is NULL.
CWE-404 The product does not release or incorrectly releases a resource before it is made available for re-use.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

CVE-2026-2903 is a null pointer dereference vulnerability in the open-source lexer generator re2c, affecting versions up to 4.4. The flaw occurs in the function check_and_merge_special_rules within the source file src/parse/ast.cc. Specifically, when a grammar block contains actions but no rules, the tool attempts to perform determinization on a null TNFA (Tagged Nondeterministic Finite Automaton) state, leading to a segmentation fault.

This happens because the code does not properly check for empty rule sets before determinization, causing it to dereference a null pointer during the epsilon closure calculation in the determinization phase. The vulnerability can be triggered by crafting input files that specify actions without corresponding rules.

A patch has been released that fixes this issue by adding checks to emit an error if actions exist without rules, preventing the null pointer dereference and subsequent crash.

Impact Analysis

This vulnerability can cause the re2c tool to crash with a segmentation fault when processing specially crafted input files. The null pointer dereference leads to a denial of service by terminating the application unexpectedly.

Since the attack requires local access to execute, it primarily impacts availability rather than confidentiality or integrity. An attacker with local access can exploit this flaw to disrupt the normal operation of the re2c tool.

Compliance Impact

I don't know

Detection Guidance

This vulnerability manifests as a null pointer dereference causing a segmentation fault in the re2c tool during the determinization phase of regex compilation. Detection involves running re2c with AddressSanitizer (ASAN) enabled on a Linux x86_64 system with a specially crafted input file that triggers the fault.

To detect the vulnerability, you can build re2c with ASAN enabled and then run it against a crafted .re file that causes the crash. The ASAN report will indicate a segmentation fault due to a NULL pointer dereference at the function closure_leftmost_dfs in src/dfa/closure_leftmost.h.

Example commands to detect the issue might include:

  • Build re2c with ASAN enabled: `clang -fsanitize=address -g -O2 -o re2c src/*.cc`
  • Run re2c on a specially crafted input file that triggers the vulnerability: `./re2c vulnerable_input.re`
  • Observe the ASAN output for segmentation fault and NULL pointer dereference errors.
Mitigation Strategies

The immediate mitigation step is to apply the patch identified by commit febeb977936f9519a25d9fbd10ff8256358cdb97, which fixes the null pointer dereference by adding checks to ensure determinization is only attempted when rules are present.

If patching is not immediately possible, avoid running untrusted or specially crafted input files through the vulnerable versions of re2c (up to version 4.4) to prevent local exploitation.

The vulnerability requires local access to exploit, so restricting access to the system and limiting who can run re2c can reduce risk.

Monitor for updates from the vendor and apply the official patch as soon as it is available.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-2903. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart