CVE-2025-5918: Libarchive: reading past eof may be triggered for piped file streams

Published Jun 6, 2025
·
Updated

A vulnerability has been identified in the libarchive library. This flaw can be triggered when file streams are piped into bsdtar, potentially allowing for reading past the end of the file. This out-of-bounds read can lead to unintended consequences, including unpredictable program behavior, memory corruption, or a denial-of-service condition.

Other sources

App Store. A permissions issue was addressed with additional restrictions.

— Apple

AppleJPEG. The issue was addressed with improved bounds checks.

— Apple

AppleMobileFileIntegrity. A downgrade issue affecting Intel-based Mac computers was addressed with additional code-signing restrictions.

— Apple

AppleMobileFileIntegrity. A permissions issue was addressed with additional restrictions.

— Apple

AppleMobileFileIntegrity. The issue was addressed by adding additional logic.

— Apple

Credit

CVE-2024-7264, CVE-2025-9086, Andreas Jaegersberger & Ro Achterberg(Nosebeard Labs), Kaitao Xie(Alibaba Group), Xiaolong Bai(Alibaba Group), Andrew Calvano(Meta Product Security), Lucas Pinheiro(Meta Product Security), Yiğit Ocak, Michael Reeves@@IntegralPilot, Duy Trần@@khanhduytran0, an anonymous researcher, Riley Walz, CVE-2025-5918, Claudio Bozzato(Cisco Talos), Francesco Benvenuto(Cisco Talos), Wojciech Regula(SecuRing), Jex Amro, Noah Gregory (wts.dev), floeki(IES Red Team of ByteDance), Zhongcheng Li(IES Red Team of ByteDance), Mickey Jin@@patch1t, Ron Elemans, Kirin@@Pwnrin(Fudan University), LFY@@secsys(Fudan University), Csaba Fitzl@@theevilbit(Iru), Kenneth Chew, iG0x72(XiguaSec), JJ(XiguaSec), Lehan Dilusha Jayasinghe, piffz, Daniel Nurkin, Al Sadman Awal, Mohamed Hamdadou & Mahran Alhazmi, Hichem Maloufi, Christian Mina, Gerson Aldaz, qwerty j0y & Ricardo Garcia, Dorian Del Valle, Andrei Simion

Affected Software

33 affected componentsFixes available
Libarchive libarchive<3.8.0
Microsoft azl3 libarchive 3.7.7-3<3.7.7-3
3.7.7-3
Microsoft cbl2 cmake 3.21.4-19<3.21.4-20
3.21.4-20
Microsoft cbl2 libarchive 3.6.1-7<3.6.1-7
3.6.1-7
Microsoft cbl2 cmake 3.21.4-20<3.21.4-20
3.21.4-20
Microsoft cbl2 cmake 3.21.4-18
Microsoft cbl2 libarchive 3.6.1-6<3.6.1-7
3.6.1-7
Microsoft azl3 cmake 3.30.3-8<3.30.3-8
3.30.3-8
Microsoft azl3 libarchive 3.7.7-2<3.7.7-3
3.7.7-3
Libarchive libarchive<3.8.0
redhat OpenShift Container Platform=4.0
redhat Enterprise Linux=6.0
redhat Enterprise Linux=7.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
debian/libarchive<3.6.2-1+deb12u4
3.6.2-1+deb12u4
debian/libarchive<3.7.4-4+deb13u1
3.7.4-4+deb13u1
debian/libarchive<3.8.4-1
3.8.4-1
Apple iOS<18.7.3
18.7.3
Apple iPadOS<18.7.3
18.7.3
Apple macOS Sequoia<15.7.3
15.7.3
Apple macOS Tahoe<26.2
26.2
Apple iOS<26.2
26.2
Apple iPadOS<26.2
26.2
Apple macOS Sonoma<14.8.3
14.8.3
debian/libarchive
3.4.3-2+deb11u33.6.2-1+deb12u43.7.4-4+deb13u13.8.4-1
ubuntu/libarchive<3.1.2-7ubuntu2.8+esm4
3.1.2-7ubuntu2.8+esm4
ubuntu/libarchive<3.1.2-11ubuntu0.16.04.8+esm2
3.1.2-11ubuntu0.16.04.8+esm2
ubuntu/libarchive<3.2.2-3.1ubuntu0.7+esm2
3.2.2-3.1ubuntu0.7+esm2
ubuntu/libarchive<3.4.0-2ubuntu1.5+esm1
3.4.0-2ubuntu1.5+esm1
ubuntu/libarchive<3.6.0-1ubuntu1.6
3.6.0-1ubuntu1.6
ubuntu/libarchive<3.7.2-2ubuntu0.6
3.7.2-2ubuntu0.6
ubuntu/libarchive<3.7.7-0ubuntu3.1
3.7.7-0ubuntu3.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.7.7-3
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.21.4-20
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.6.1-7
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.30.3-8
  5. Upgrade

    Upgrade debian/libarchive to a version that resolves this vulnerability.

    Fixed in 3.6.2-1+deb12u4
  6. Upgrade

    Upgrade debian/libarchive to a version that resolves this vulnerability.

    Fixed in 3.7.4-4+deb13u1
  7. Upgrade

    Upgrade debian/libarchive to a version that resolves this vulnerability.

    Fixed in 3.8.4-1
  8. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 18.7.3
  9. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 15.7.3
  10. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 26.2
  11. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 14.8.3
  12. Upgrade

    Upgrade debian/libarchive to a version that resolves this vulnerability.

    Fixed in 3.4.3-2+deb11u3Fixed in 3.6.2-1+deb12u4Fixed in 3.7.4-4+deb13u1Fixed in 3.8.4-1
  13. Upgrade

    Upgrade ubuntu/libarchive to a version that resolves this vulnerability.

    Fixed in 3.1.2-7ubuntu2.8+esm4
  14. Upgrade

    Upgrade ubuntu/libarchive to a version that resolves this vulnerability.

    Fixed in 3.1.2-11ubuntu0.16.04.8+esm2
  15. Upgrade

    Upgrade ubuntu/libarchive to a version that resolves this vulnerability.

    Fixed in 3.2.2-3.1ubuntu0.7+esm2
  16. Upgrade

    Upgrade ubuntu/libarchive to a version that resolves this vulnerability.

    Fixed in 3.4.0-2ubuntu1.5+esm1
  17. Upgrade

    Upgrade ubuntu/libarchive to a version that resolves this vulnerability.

    Fixed in 3.6.0-1ubuntu1.6
  18. Upgrade

    Upgrade ubuntu/libarchive to a version that resolves this vulnerability.

    Fixed in 3.7.2-2ubuntu0.6
  19. Upgrade

    Upgrade ubuntu/libarchive to a version that resolves this vulnerability.

    Fixed in 3.7.7-0ubuntu3.1

Event History

Jun 6, 2025
Data Sourced
via Red Hat·07:44 PM
DescriptionSeverityAffected Software
Jun 9, 2025
CVE Published
via MITRE·07:49 PM
Data Sourced
via MITRE·07:49 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeakness
Jul 11, 2025
Event
via FIRST·12:00 AM
Aug 15, 2025
Data Sourced
via NVD·06:35 PM
RemedyAffected Software
Updated
via NVD·06:35 PM
Severity
Event
via NVD·06:35 PM
Sep 3, 2025
Data Sourced
via Microsoft·11:17 PM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·11:17 PM
Affected Software
Updated
via Microsoft·11:17 PM
Weakness
Sep 4, 2025
Updated
via Microsoft·06:17 AM
WeaknessAffected Software
Updated
via Microsoft·06:17 AM
SeverityWeaknessAffected Software
Dec 12, 2025
Data Sourced
via Apple·12:00 AM
DescriptionWeaknessAffected Software
Updated
via Apple·12:00 AM
Description
Aug 13, 2026
Updated
via Microsoft·07:13 AM
Weakness
Nov 24, 2026
Data Sourced
via OSV·02:55 PM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2025-5918?

CVE-2025-5918 is classified as a medium severity vulnerability due to the potential for out-of-bounds reads.

2

How do I fix CVE-2025-5918?

To mitigate CVE-2025-5918, you should update the libarchive library to the latest patched version.

3

What are the potential impacts of CVE-2025-5918?

CVE-2025-5918 could lead to unpredictable behavior in applications using libarchive, including potential data leakage.

4

What software is affected by CVE-2025-5918?

CVE-2025-5918 affects all software that utilizes the libarchive library, particularly when using bsdtar.

5

How can I determine if CVE-2025-5918 is present in my system?

You can check for CVE-2025-5918 by reviewing the version of the libarchive library installed on your system.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203