Description
lwjson 1.8.1 contains an improper input validation vulnerability in the streaming JSON parser (lwjson_stream.c). The end-of-string detection logic incorrectly identifies escaped quote characters by only checking the immediately preceding character rather than counting consecutive backslashes, causing valid JSON strings ending with an escaped backslash (like "\\") to never terminate parsing. A remote attacker can send well-formed JSON to cause applications using lwjson_stream_parse() to hang indefinitely, resulting in denial of service.
Published: 2026-05-08
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability arises from improper input validation in lwjson's streaming JSON parser. The parser incorrectly handles escaped quote characters, only examining the preceding character rather than counting consecutive backslashes. This flaw maps to CWE‑835 (Infinite Loop). Consequently, JSON strings that end in an escaped backslash never terminate, causing the parser to loop indefinitely. A remote attacker can send a crafted, well‑formed JSON payload containing such a string to trigger an indefinite hang in any application that uses lwjson_stream_parse(), resulting in denial of service.

Affected Systems

This defect is present in applications that link against lwjson version 1.8.1. The affected code resides in the lwjson_stream.c file of the lwjson project repository. No specific commercial vendors are listed, but any software that embeds this library at compile time is susceptible.

Risk and Exploitability

The CVE has a CVSS score of 7.5 and the EPSS score is not available. The vulnerability is not in the CISA KEV catalog, indicating no confirmed exploitation yet. The attack vector is inferred to be remote: a malicious JSON payload sent over a network interface can trigger the infinite loop, making the process unresponsive. The impact is limited to availability, but any service that cannot recover from a hung parsing routine faces significant disruption.

Generated by OpenCVE AI on May 8, 2026 at 22:51 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to a patched version of lwjson if one is released.
  • If an upgrade is not possible, manually patch lwjson_stream.c to count consecutive backslashes correctly or add a timeout to the parsing routine.
  • Implement application‑level safeguards such as binding the parsing operation to a separate thread with a resource limit or employing a watchdog timer to detect and recover from hangs.

Generated by OpenCVE AI on May 8, 2026 at 22:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 08 May 2026 23:15:00 +0000

Type Values Removed Values Added
Title Infinite Loop in lwjson Streaming Parser Causing Denial of Service

Fri, 08 May 2026 21:30:00 +0000

Type Values Removed Values Added
Title Improper String Parsing Leads to Application Hang in lwjson Streaming Parser
Weaknesses CWE-679

Fri, 08 May 2026 19:15:00 +0000

Type Values Removed Values Added
Title Improper String Parsing Leads to Application Hang in lwjson Streaming Parser
Weaknesses CWE-679

Fri, 08 May 2026 18:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-835
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 08 May 2026 16:00:00 +0000

Type Values Removed Values Added
Description lwjson 1.8.1 contains an improper input validation vulnerability in the streaming JSON parser (lwjson_stream.c). The end-of-string detection logic incorrectly identifies escaped quote characters by only checking the immediately preceding character rather than counting consecutive backslashes, causing valid JSON strings ending with an escaped backslash (like "\\") to never terminate parsing. A remote attacker can send well-formed JSON to cause applications using lwjson_stream_parse() to hang indefinitely, resulting in denial of service.
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-05-08T18:07:25.688Z

Reserved: 2026-03-04T00:00:00.000Z

Link: CVE-2026-29975

cve-icon Vulnrichment

Updated: 2026-05-08T18:05:49.894Z

cve-icon NVD

Status : Received

Published: 2026-05-08T16:16:10.213

Modified: 2026-05-08T19:16:30.400

Link: CVE-2026-29975

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-08T23:00:16Z

Weaknesses