---
id: CVE-2022-36227
title: >-
  In libarchive before 3.6.2, the software does not check for an error after
  calling calloc function that can return with a NULL pointer if the function
  fails, which leads to a resultant NULL pointer dereference
summary: >-
  In libarchive before 3.6.2, the software does not check for an error after
  calling calloc function that can return with a NULL pointer if the function
  fails, which leads to a resultant NULL pointer dereference. NOTE: the
  discoverer cites…
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-476
vendor: libarchive
product: libarchive
affected:
  - 'libarchive >= 3.0.0, < 3.6.2'
  - debian_linux = 10.0
  - fedora = 37
  - 'universal_forwarder >= 8.2.0, < 8.2.12'
  - 'universal_forwarder >= 9.0.0, < 9.0.6'
  - universal_forwarder = 9.1.0
patched:
  - libarchive 3.6.2
  - universal_forwarder 9.0.6
published: '2022-11-22'
updated: '2026-10-08'
sourceUpdated: '2026-10-08T21:17:48.930'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2022-36227'
references:
  - url: 'https://bugs.gentoo.org/882521'
    label: cve@mitre.org
  - url: >-
      https://github.com/libarchive/libarchive/blob/v3.0.0a/libarchive/archive_write.c#L215
    label: cve@mitre.org
  - url: 'https://github.com/libarchive/libarchive/issues/1754'
    label: cve@mitre.org
  - url: 'https://lists.debian.org/debian-lts-announce/2023/01/msg00034.html'
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V67OO2UUQAUJS3IK4JZPF6F3LUCBU6IS/
    label: cve@mitre.org
  - url: 'https://security.gentoo.org/glsa/202309-14'
    label: cve@mitre.org
  - url: 'https://bugs.gentoo.org/882521'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://github.com/libarchive/libarchive/blob/v3.0.0a/libarchive/archive_write.c#L215
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/libarchive/libarchive/issues/1754'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2023/01/msg00034.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2024/11/msg00007.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V67OO2UUQAUJS3IK4JZPF6F3LUCBU6IS/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.gentoo.org/glsa/202309-14'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.02445
epssPercentile: 0.83854
ingestedAt: '2026-10-08T22:11:53.759Z'
---

## Overview

In libarchive before 3.6.2, the software does not check for an error after calling calloc function that can return with a NULL pointer if the function fails, which leads to a resultant NULL pointer dereference. NOTE: the discoverer cites this CWE-476 remark but third parties dispute the code-execution impact: "In rare circumstances, when NULL is equivalent to the 0x0 memory address and privileged code can access it, then writing or reading memory is possible, which may lead to code execution."

## Affected

- `libarchive >= 3.0.0, < 3.6.2`
- `debian_linux = 10.0`
- `fedora = 37`
- `universal_forwarder >= 8.2.0, < 8.2.12`
- `universal_forwarder >= 9.0.0, < 9.0.6`
- `universal_forwarder = 9.1.0`

## Remediation

Upgrade past the affected range:

- `libarchive 3.6.2`
- `universal_forwarder 9.0.6`
