Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-115327 Overview
CVE-2026-115327 is an uninitialized pointer free vulnerability in libyang through version 6.4.13. The flaw resides in the lydxml_env_netconf_rpc() function within src/parser_xml.c when parsing NETCONF rpc action envelopes. An authenticated peer with an active NETCONF session can transmit a crafted action element containing non-whitespace text via lyd_parse_op(). This triggers a free of an uninitialized pointer, crashing servers that depend on libyang such as netopeer2 or corrupting the process heap. The weakness is categorized under [CWE-824: Access of Uninitialized Pointer].
Critical Impact
Authenticated NETCONF peers can crash servers like netopeer2 or corrupt heap memory by sending a malformed rpc action envelope.
Affected Products
- CESNET libyang through version 6.4.13
- netopeer2 NETCONF server (and other libyang-dependent NETCONF implementations)
- Network management stacks embedding libyang for YANG/NETCONF parsing
Discovery Timeline
- 2026-10-22 - CVE-2026-115327 published to NVD
- 2026-10-22 - Last updated in NVD database
Technical Details for CVE-2026-115327
Vulnerability Analysis
The vulnerability affects libyang's XML parser when processing NETCONF rpc envelopes. The function lydxml_env_netconf_rpc() is responsible for parsing the outer action envelope and producing an opaque node for the caller. Under normal conditions, the output envelope pointer (envp) is assigned after successful parsing. When the parser encounters non-whitespace text inside an action element, the error path is taken before the pointer is initialized. The caller then treats the uninitialized value as a valid envelope pointer and later passes it to the free routine. This produces either a crash via SIGSEGV or heap corruption, depending on the stack contents at the time of the fault.
Root Cause
The root cause is a contract mismatch between lydxml_env_netconf_rpc() and its caller in src/parser_xml.c. The function's output parameter envp was documented as the parsed envelope but was not guaranteed to be set only on success. When the function returned an LY_ERR value after detecting unexpected non-whitespace text, callers still freed envp, dereferencing stack-resident garbage.
Attack Vector
Exploitation requires an authenticated NETCONF session with the target server. The attacker submits an rpc message containing an action envelope element with embedded non-whitespace text content. When the server invokes lyd_parse_op() to parse the operation, libyang reaches the vulnerable envelope handling path and frees uninitialized memory. The result is a denial of service against the NETCONF server process or, depending on heap state, memory corruption that could influence subsequent allocations.
* @param[in] name Name of the element.
* @param[in] uri URI of the element.
* @param[in] value Whether a value is expected in the element.
- * @param[out] evnp Parsed envelope (opaque node).
+ * @param[out] envp Parsed envelope (opaque node), set only on success.
* @return LY_SUCCESS on success.
* @return LY_ENOT if the specified element did not match.
* @return LY_ERR value on error.
Source: GitHub libyang Commit 927fce908 — the patch clarifies and enforces that the envelope output pointer is only populated on success, preventing callers from freeing uninitialized memory.
Detection Methods for CVE-2026-115327
Indicators of Compromise
- Unexpected crashes or restarts of netopeer2 or other libyang-based NETCONF server processes
- Core dumps referencing lydxml_env_netconf_rpc or lyd_parse_op in the call stack
- NETCONF session logs showing rpc messages containing action elements with embedded text content prior to a crash
- Heap corruption indicators in process telemetry such as glibc malloc(): invalid pointer or free(): invalid pointer messages
Detection Strategies
- Enable NETCONF server audit logging and inspect incoming rpc payloads for malformed action envelopes containing text nodes
- Monitor process supervisors (systemd, container runtimes) for repeated restart loops of NETCONF daemons
- Deploy address sanitizer or hardened allocators (MALLOC_CHECK_, scudo) in test environments to surface the invalid free deterministically
Monitoring Recommendations
- Collect endpoint telemetry on NETCONF-facing hosts and alert on segmentation faults or abort signals from server processes
- Correlate authentication events on port 830 (NETCONF over SSH) with downstream service crashes to identify abusive sessions
- Track libyang package versions across infrastructure using software bill of materials tooling to identify systems still exposed
How to Mitigate CVE-2026-115327
Immediate Actions Required
- Upgrade libyang to a release containing commit 927fce908774289a7d9c07fff5704c33965c9773 or later, past version 6.4.13
- Rebuild and redeploy downstream consumers such as netopeer2 against the patched libyang
- Restrict NETCONF access to trusted management networks and audit the list of accounts with session privileges
Patch Information
The upstream fix is available in CESNET/libyang commit 927fce908774289a7d9c07fff5704c33965c9773. The patch updates lydxml_env_netconf_rpc() so the envelope output pointer is set only on success, and adjusts the caller to avoid freeing an uninitialized value. Refer to GitHub libyang Issue #2595 and the VulnCheck Libyang Advisory for full technical context.
Workarounds
- Limit NETCONF account privileges to the minimum required and revoke sessions for untrusted peers until patching is complete
- Place an inspection proxy or ACL in front of the NETCONF endpoint to drop rpc messages whose action envelopes contain non-whitespace text
- Enable automatic process restart with rate limiting to maintain availability while a fix is rolled out
# Verify installed libyang version and rebuild dependent services
ldconfig -p | grep libyang
yanglint --version
# Example: upgrade from source once patched release is available
git clone https://github.com/CESNET/libyang.git
cd libyang && git checkout <patched-tag>
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make && sudo make install
sudo systemctl restart netopeer2-server
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

