Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2020-15158

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2020-15158
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:33 UTC · Revision 1

Source evidence

CVE-2020-15158

core-osv · Original source

Published 26 Aug 2020, 18:15 UTC

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.

osv:CVE-2020-15158
Complete source record
{
  "id": "84469d559f2a94f4979e317bac20bc0bb371c04a0f6696ce57538d18c4ed59c9",
  "url": "https://osv.dev/vulnerability/CVE-2020-15158",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2020-15158",
    "summary": "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.",
    "evidence": "osv:CVE-2020-15158",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2020-15158",
      "aliases": [
        "CVE-2020-15158",
        "GHSA-pq77-fmf7-hjw8"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/mz-automation/libiec61850",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "033ab5b6488250c8c3b838f25a7cbc3e099230bb"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "033ab5b6488250c8c3b838f25a7cbc3e099230bb"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.4.2.1",
            "v1.4.2",
            "v1.4.1",
            "v1.4.0",
            "v1.2.0",
            "v1.3.0",
            "v1.2.2",
            "v1.2.1",
            "v1.1",
            "v1.0.1",
            "v1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-15158.json",
            "vanir_signatures": [
              {
                "id": "CVE-2020-15158-da1ffc64",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "9747529637114398146814241612898872555",
                    "228877145579337979129107497074593147651",
                    "157299610004521608123355527784644828839"
                  ]
                },
                "source": "https://github.com/mz-automation/libiec61850/commit/033ab5b6488250c8c3b838f25a7cbc3e099230bb",
                "target": {
                  "file": "src/mms/iso_cotp/cotp.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-15158-efd3bf5f",
                "digest": {
                  "length": 1593,
                  "function_hash": "246948022025928313530960372354749505204"
                },
                "source": "https://github.com/mz-automation/libiec61850/commit/033ab5b6488250c8c3b838f25a7cbc3e099230bb",
                "target": {
                  "file": "src/mms/iso_cotp/cotp.c",
                  "function": "CotpConnection_readToTpktBuffer"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T13:51:54Z"
          }
        }
      ],
      "modified": "2026-10-20T13:51:54.590315115Z",
      "provider": "osv",
      "references": [
        "https://github.com/mz-automation/libiec61850/issues/250",
        "https://github.com/mz-automation/libiec61850/security/advisories/GHSA-pq77-fmf7-hjw8",
        "https://github.com/mz-automation/libiec61850/commit/033ab5b6488250c8c3b838f25a7cbc3e099230bb"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:mz-automation:libiec61850:*:*:*:*:*:*:*:*"
            ],
            "vendor_product": "mz-automation:libiec61850",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "1.4.0"
                  },
                  {
                    "fixed": "1.4.3"
                  }
                ],
                "source": "CPE_RANGE"
              }
            ]
          },
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "61850"
                  },
                  {
                    "fixed": "1.4.3"
                  }
                ],
                "source": "DESCRIPTION"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2020-15158",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388294,
  "published_at": "2020-08-26T18:15:10.287+00:00"
}