GHSA-rcc6-v4r6-gj4m / CVE-2026-30873: jsonpath: Memory leak when processing strings, labels, and regexp tokens
- Published:
- Fetched:
- Updated:
- Affects:
- openwrt OpenWrt
https://github.com/openwrt/openwrt/security/advisories/GHSA-rcc6-v4r6-gj4m ↗
jsonpath: Memory leak when processing strings, labels, and regexp tokens The jp_get_token function is part of the lexical analysis phase, which breaks input expressions into individual tokens for subsequent parsing. During tokenization, the library extracts and stores string literals, field labels, and regular expressions, which involves dynamic memory allocation to handle variable-length text content. The extraction results are stored in the jp_opcode struct, which is later transferred to a new jp_opcode object in the jp_alloc_op function. If a string was previously extracted to an initial jp_opcode object, the string will be copied to the new allocation, without freeing the previous one, leading to a memory leak. Affected packages: :OpenWrt Patched: OpenWrt 24.10.6, OpenWrt 25.12.1