VYPR
Unrated severityNVD Advisory· Published Jun 6, 2023· Updated Jan 8, 2025

CVE-2023-33460

CVE-2023-33460

Description

A memory leak in yajl 2.1.0's yajl_tree_parse function, triggered by crafted JSON input, can exhaust server memory leading to denial of service.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A memory leak in yajl 2.1.0's yajl_tree_parse function, triggered by crafted JSON input, can exhaust server memory leading to denial of service.

Vulnerability

A memory leak exists in the yajl library version 2.1.0 within the yajl_tree_parse function. When processing a specially crafted JSON payload such as {"@\\\n\\\\", the parser fails to free allocated memory during error recovery, resulting in a leak of 73 bytes per invocation as detected by AddressSanitizer (ASan) [1]. The leak originates from allocations in context_push, value_alloc, and handle_string that are not released on parse failure.

Exploitation

An attacker needs to supply a malicious JSON input to any application that uses yajl_tree_parse (for example, the parse_config.c example) [1]. No authentication or special network position is required if the parser is exposed to untrusted data. Sending the crafted string repeatedly will cause the server's memory to grow unboundedly, eventually leading to an out-of-memory crash.

Impact

Successful exploitation results in a denial-of-service (DoS) condition because the memory leak exhausts available memory, causing the target process to crash. The vulnerability does not allow arbitrary code execution or information disclosure; the impact is limited to availability loss.

Mitigation

As of the available references, no official patch has been released for yajl 2.1.0 [1]. Users should monitor the upstream repository (https://github.com/lloyd/yajl) for a fix. If a patched version is not yet available, developers can mitigate the risk by validating and limiting the size of JSON input before passing it to yajl_tree_parse, or by restarting the affected process regularly to clear accumulated memory.

AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

25

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"A memory leak exists in the yajl_tree_parse function when processing specific malformed JSON input."

Attack vector

An attacker can trigger this vulnerability by providing a specially crafted JSON string to the `yajl_tree_parse` function. The provided example input `{"@\\n\\""` causes a memory leak during parsing. Repeatedly triggering this leak can exhaust server memory, leading to a denial-of-service condition and application crash [ref_id=1].

Affected code

The vulnerability resides within the `yajl_tree_parse` function located in `yajl/src/yajl_tree.c`. Specifically, the issue is triggered during the parsing of malformed JSON, leading to memory leaks in functions like `context_push`, `value_alloc`, and `handle_string` as indicated by the AddressSanitizer output [ref_id=1].

What the fix does

The advisory does not specify a patch or provide details on the fix. Remediation guidance would typically involve correcting the parsing logic to properly handle the malformed input and free allocated memory. Without a patch, the vulnerability remains unaddressed in the affected version.

Preconditions

  • inputThe application must call the `yajl_tree_parse` function with a malformed JSON input, such as `{"@\\n\\""`.

Reproduction

1. Compile yajl with AddressSanitizer: `cmake . -DCMAKE_C_COMPILER=gcc -fsanitize=address -g` 2. Use the `example/parse_config.c` program. 3. Provide the crash input: `{"@\\n\\""` This will result in AddressSanitizer detecting memory leaks [ref_id=1].

Generated on Jun 8, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.