The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-36976

CVE-2021-36976: Libarchive Use-After-Free Vulnerability

CVE-2021-36976 is a use-after-free vulnerability in Libarchive versions 3.4.1 through 3.5.1 that can lead to memory corruption. This article covers the technical details, affected versions, impact, and mitigation strategies.

Published: February 25, 2026

CVE-2021-36976 Overview

CVE-2021-36976 is a use-after-free vulnerability affecting libarchive versions 3.4.1 through 3.5.1. The flaw exists in the copy_string function, which is called from do_uncompress_block and process_block during archive decompression operations. This memory corruption vulnerability can be triggered when processing specially crafted archive files, potentially leading to denial of service conditions.

Critical Impact

A use-after-free condition in libarchive's decompression routines can cause application crashes or unexpected behavior when processing malicious archive files, affecting a wide range of systems including Apple iOS, macOS, and enterprise software like Splunk Universal Forwarder.

Affected Products

  • libarchive libarchive (versions 3.4.1 through 3.5.1)
  • Apple iPadOS
  • Apple iPhone OS
  • Apple macOS
  • Apple watchOS
  • Fedora Project Fedora 35
  • Splunk Universal Forwarder

Discovery Timeline

  • 2021-07-20 - CVE-2021-36976 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2021-36976

Vulnerability Analysis

This vulnerability is classified as CWE-416 (Use After Free), a dangerous memory corruption flaw that occurs when a program continues to use a pointer after the memory it references has been freed. In the context of libarchive, this issue manifests during the decompression of archive data, specifically within the copy_string function that handles string operations during block processing.

The vulnerability was discovered through OSS-Fuzz automated fuzzing, as documented in OSS-Fuzz Bug Report #32375. The issue occurs when the decompression routines in do_uncompress_block and process_block invoke copy_string with references to memory that has already been deallocated. This can lead to accessing stale memory, causing crashes or potentially allowing an attacker to manipulate program execution.

The network attack vector indicates that exploitation requires user interaction—typically opening or extracting a maliciously crafted archive file. While the primary impact is availability (denial of service through application crash), use-after-free vulnerabilities are known to sometimes escalate to more severe consequences depending on memory layout and exploitation techniques.

Root Cause

The root cause lies in improper memory management within libarchive's LZW/LZMA decompression implementation. When processing compressed blocks, the copy_string function references string data that may be freed prematurely due to buffer reallocation or cleanup operations during the decompression process. The freed memory pointer is not properly nullified or checked before subsequent use, creating the use-after-free condition.

Attack Vector

The attack vector is network-based but requires user interaction. An attacker would need to craft a malicious archive file (such as tar, cpio, or other formats supported by libarchive) that triggers the vulnerable code path during extraction. The victim would need to download and attempt to extract or process this archive using an application that relies on the vulnerable libarchive versions.

Attack scenarios include:

  1. Email-based delivery: Malicious archive attachments sent via email that crash applications when opened
  2. Web download exploitation: Compromised or malicious websites hosting crafted archives
  3. Supply chain attacks: Malicious archives distributed through software repositories or package managers
  4. Automated processing systems: Exploitation of systems that automatically process uploaded archives

The vulnerability requires the attacker to entice a user to process a malicious archive file, but once triggered, it can cause immediate application crashes and potential data loss from interrupted operations.

Detection Methods for CVE-2021-36976

Indicators of Compromise

  • Application crashes in processes using libarchive when extracting or processing archive files
  • Crash dumps referencing copy_string, do_uncompress_block, or process_block functions
  • Unusual archive files with malformed compression blocks in downloaded content
  • Core dumps or segmentation faults in archive-handling utilities like tar or bsdtar

Detection Strategies

  • Monitor for crash events in applications using libarchive, particularly during archive extraction operations
  • Implement file integrity monitoring on systems processing archives to detect exploitation attempts
  • Use memory sanitizer tools (AddressSanitizer) in development and testing environments to catch use-after-free conditions
  • Deploy endpoint detection that monitors for suspicious process terminations in archive utilities

Monitoring Recommendations

  • Enable crash reporting and analysis on systems processing user-supplied archive files
  • Monitor application logs for repeated failures when processing archives from untrusted sources
  • Track libarchive version usage across the environment to identify vulnerable deployments
  • Review security advisories from Apple, Fedora, Gentoo, and Debian for patch availability

How to Mitigate CVE-2021-36976

Immediate Actions Required

  • Update libarchive to version 3.5.2 or later, which contains the fix for this vulnerability
  • Apply vendor-specific patches from Apple (macOS 12.3, iOS 15.4, iPadOS 15.4, watchOS 8.5), Fedora, Gentoo, or Debian
  • Restrict processing of archive files from untrusted sources until patches are applied
  • Implement input validation to reject malformed or suspicious archive files

Patch Information

Multiple vendors have released patches addressing this vulnerability:

  • Apple: Security updates available as documented in Apple Security Advisory HT213182, HT213183, and HT213193
  • Fedora: Patch available through Fedora Package Announcement
  • Gentoo: Update available via Gentoo GLSA 2022-08-26
  • Debian: Long-term support update documented in Debian LTS Announcement November 2024
  • Splunk Universal Forwarder: Check Splunk security advisories for updated versions

Workarounds

  • Isolate archive processing operations in sandboxed environments to contain potential crashes
  • Implement strict file type validation before processing archives with libarchive
  • Use alternative archive libraries for critical operations until patching is complete
  • Deploy application restart mechanisms to recover from crash-based denial of service
bash
# Check installed libarchive version
pkg-config --modversion libarchive

# On macOS, verify system library version
otool -L /usr/lib/libarchive.dylib

# On Linux, check package version
dpkg -l libarchive13 || rpm -q libarchive

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeUse After Free

  • Vendor/TechLibarchive

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability0.19%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-416
  • Technical References
  • Full Disclosure March 27, 2022

  • Full Disclosure March 28, 2022

  • Full Disclosure March 29, 2022

  • OSS-Fuzz Bug Report #32375

  • GitHub OSS-Fuzz Vulnerability Report

  • Fedora Package Announcement

  • Gentoo GLSA 2022-08-26

  • Apple Security Advisory HT213182

  • Apple Security Advisory HT213183

  • Apple Security Advisory HT213193

  • Debian LTS Announcement November 2024
  • Related CVEs
  • CVE-2022-36227: Libarchive Use-After-Free Vulnerability

  • CVE-2026-5745: libarchive NULL Pointer DoS Vulnerability

  • CVE-2026-5121: libarchive RCE Vulnerability

  • CVE-2026-4426: libarchive DOS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English