CVE-2021-31566
Splunk Forwarder vulnerability analysis and mitigation

Overview

CVE-2021-31566 is an improper link resolution vulnerability in libarchive that was discovered in 2021. The flaw occurs while extracting an archive, leading to unauthorized changes of modes, times, access control lists, and flags of files outside the archive. This vulnerability affects libarchive versions up to (excluding) 3.5.2 and various systems and applications that use this library (NVD, Red Hat).

Technical details

The vulnerability stems from an improper link resolution mechanism during archive extraction. When processing fixup entries, if a directory entry is marked for post-processing and a symlink entry with the same path replaces the directory, the postprocessing may incorrectly alter the link target instead of the file itself. The vulnerability has been assigned a CVSS v3.1 base score of 7.8 (HIGH) with the vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (NVD, GitHub Issue).

Impact

The vulnerability allows a local attacker to gain elevated privileges in a system by providing a malicious archive to a victim user. When the victim attempts to extract the archive, the flaw can be triggered, potentially leading to unauthorized modification of files outside the intended extraction scope (NVD).

Mitigation and workarounds

The vulnerability was fixed in libarchive version 3.5.2. The fix involves using lchmod() instead of chmod() and modifying the handling of symbolic links during the fixup process. Multiple patches were implemented to address this issue, including b41daecb5ccb4c8e3b2c53fd6147109fc12c3043 and subsequent improvements (GitHub Commit, Debian Advisory).

Additional resources


SourceThis report was generated using AI

Related Splunk Forwarder vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-20298HIGH8
  • Splunk ForwarderSplunk Forwarder
  • cpe:2.3:a:splunk:universal_forwarder
NoYesJun 02, 2025
CVE-2023-27537MEDIUM5.9
  • MySQLMySQL
  • libcurl-debuginfo
NoYesMar 30, 2023
CVE-2023-27536MEDIUM5.9
  • MySQLMySQL
  • mysql
NoYesMar 30, 2023
CVE-2023-27535MEDIUM5.9
  • MySQLMySQL
  • curl-debuginfo
NoYesMar 30, 2023
CVE-2023-27538MEDIUM5.5
  • MySQLMySQL
  • curl-minimal
NoYesMar 30, 2023

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management