Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2020-21674

Heap-based buffer overflow in archive_string_append_from_wcs() (archive_string.c) in libarchive-3.4.1dev allows remote attackers to cause a denial of service (out-of-bounds write in heap memory resulting into a crash) via a crafted archive file. NOTE: this only affects users who downloaded the development code from GitHub. Users of the product's official releases are unaffected.

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

Source evidence

CVE-2020-21674

core-osv · Original source

Published 15 Oct 2020, 15:15 UTC

Heap-based buffer overflow in archive_string_append_from_wcs() (archive_string.c) in libarchive-3.4.1dev allows remote attackers to cause a denial of service (out-of-bounds write in heap memory resulting into a crash) via a crafted archive file. NOTE: this only affects users who downloaded the development code from GitHub. Users of the product's official releases are unaffected.

osv:CVE-2020-21674
Complete source record
{
  "id": "bb82951093a0edc04528e18716f9da33f484a743ba807422cf851a5d7354bb4d",
  "url": "https://osv.dev/vulnerability/CVE-2020-21674",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2020-21674",
    "summary": "Heap-based buffer overflow in archive_string_append_from_wcs() (archive_string.c) in libarchive-3.4.1dev allows remote attackers to cause a denial of service (out-of-bounds write in heap memory resulting into a crash) via a crafted archive file. NOTE: this only affects users who downloaded the development code from GitHub. Users of the product's official releases are unaffected.",
    "evidence": "osv:CVE-2020-21674",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2020-21674",
      "aliases": [
        "CVE-2020-21674"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/libarchive/libarchive",
              "type": "GIT",
              "events": [
                {
                  "introduced": "cce09646b566c61c2debff58a70da780b8457883"
                },
                {
                  "last_affected": "cce09646b566c61c2debff58a70da780b8457883"
                },
                {
                  "fixed": "4f085eea879e2be745f4d9bf57e8513ae48157f4"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:libarchive:libarchive:3.4.1:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.4.1"
                      },
                      {
                        "last_affected": "3.4.1"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "range": [
                      {
                        "fixed": "4f085eea879e2be745f4d9bf57e8513ae48157f4"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.4.1",
            "v3.4.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-21674.json",
            "vanir_signatures": [
              {
                "id": "CVE-2020-21674-261c3f39",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "116072633996693821785027581455796757274",
                    "263475613020376564928275470288168600925",
                    "35946731963817428492056963881029968778",
                    "296071922221007169360767292332859772771",
                    "220577582959158359478493625985624478790",
                    "24629896105847692471971921686267738172",
                    "260617937097323827464431308041105301840",
                    "265771018612808281715836621317599184067",
                    "131567820986708162080378277940629658416",
                    "24629896105847692471971921686267738172",
                    "260617937097323827464431308041105301840"
                  ]
                },
                "source": "https://github.com/libarchive/libarchive/commit/4f085eea879e2be745f4d9bf57e8513ae48157f4",
                "target": {
                  "file": "libarchive/archive_string.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-21674-596d9501",
                "digest": {
                  "length": 1087,
                  "function_hash": "291484009972018707314609976661061493870"
                },
                "source": "https://github.com/libarchive/libarchive/commit/4f085eea879e2be745f4d9bf57e8513ae48157f4",
                "target": {
                  "file": "libarchive/archive_string.c",
                  "function": "archive_string_append_from_wcs"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2020-21674-c8b835c7",
                "digest": {
                  "length": 1202,
                  "function_hash": "80370799617205615188298360175217438738"
                },
                "source": "https://github.com/libarchive/libarchive/commit/4f085eea879e2be745f4d9bf57e8513ae48157f4",
                "target": {
                  "file": "libarchive/archive_string.c",
                  "function": "strncat_from_utf8_libarchive2"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T13:55:24Z"
          }
        }
      ],
      "modified": "2026-10-20T13:55:24.775936744Z",
      "provider": "osv",
      "references": [
        "https://github.com/libarchive/libarchive/issues/1298",
        "https://github.com/libarchive/libarchive/commit/4f085eea879e2be745f4d9bf57e8513ae48157f4"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2020-21674",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 388374,
  "published_at": "2020-10-15T15:15:11.28+00:00"
}