CVE-2025-5917: Libarchive: off by one error in build_ustar_entry_name() at archive_write_set_format_pax.c

Published Jun 6, 2025
·
Updated

A vulnerability has been identified in the libarchive library. This flaw involves an 'off-by-one' miscalculation when handling prefixes and suffixes for file names. This can lead to a 1-byte write overflow. While seemingly small, such an overflow can corrupt adjacent memory, leading to unpredictable program behavior, crashes, or in specific circumstances, could be leveraged as a building block for more sophisticated exploitation. This bug affects libarchive versions prior to 3.8.0.

Other sources

In libarchive before 3.8.0, an off by one miscalculation of prefixes and suffixes for file names may lead to a 1 byte write overflow.

— Red Hat

Libarchive: off by one error in buildustarentryname() at archivewritesetformatpax.c

— Microsoft

Affected Software

27 affected componentsFixes available
Libarchive libarchive<3.8.0
Microsoft cbl2 libarchive 3.6.1-7<3.6.1-7
3.6.1-7
Microsoft azl3 libarchive 3.7.7-3<3.7.7-3
3.7.7-3
Microsoft azl3 libarchive 3.7.7-2<3.7.7-3
3.7.7-3
Microsoft azl3 cmake 3.30.3-8<3.30.3-8
3.30.3-8
Microsoft cbl2 cmake 3.21.4-18
Microsoft cbl2 cmake 3.21.4-20<3.21.4-20
3.21.4-20
Microsoft cbl2 libarchive 3.6.1-6<3.6.1-7
3.6.1-7
Microsoft cbl2 cmake 3.21.4-19<3.21.4-20
3.21.4-20
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
redhat Enterprise Linux=10.0
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.5
3.6.0-1ubuntu1.5
ubuntu/libarchive<3.7.2-2ubuntu0.5
3.7.2-2ubuntu0.5
ubuntu/libarchive<3.7.7-0ubuntu3
3.7.7-0ubuntu3
debian/libarchive<3.6.2-1+deb12u3
3.6.2-1+deb12u3
debian/libarchive<3.7.4-4
3.7.4-4
debian/libarchive<3.7.4-4
3.7.4-4
debian/libarchive
3.4.3-2+deb11u33.6.2-1+deb12u33.7.4-4

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.6.1-7
  2. Upgrade

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

    Fixed in 3.7.7-3
  3. Upgrade

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

    Fixed in 3.30.3-8
  4. Upgrade

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

    Fixed in 3.21.4-20
  5. Upgrade

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

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

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

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

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

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

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

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

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

    Fixed in 3.6.0-1ubuntu1.5
  10. Upgrade

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

    Fixed in 3.7.2-2ubuntu0.5
  11. Upgrade

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

    Fixed in 3.7.7-0ubuntu3
  12. Upgrade

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

    Fixed in 3.6.2-1+deb12u3
  13. Upgrade

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

    Fixed in 3.7.4-4
  14. Upgrade

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

    Fixed in 3.4.3-2+deb11u3Fixed in 3.6.2-1+deb12u3Fixed in 3.7.4-4
  15. Upgrade

    Upgrade libarchive to a version that resolves this vulnerability.

    Fixed in 3.8.0

Event History

Jun 6, 2025
Data Sourced
via Red Hat·07:26 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:16 PM
RemedyAffected Software
Updated
via NVD·06:16 PM
Severity
Event
via NVD·06:16 PM
Sep 3, 2025
Data Sourced
via Microsoft·11:25 PM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·11:25 PM
Affected Software
Updated
via Microsoft·11:25 PM
Weakness
Sep 4, 2025
Updated
via Microsoft·06:25 AM
WeaknessAffected Software
Updated
via Microsoft·06:25 AM
SeverityWeaknessAffected Software
Dec 12, 2025
Updated
via MITRE·12:40 AM
Description
Updated
via NVD·01:15 AM
Description
Aug 13, 2026
Updated
via Microsoft·07:14 AM
Weakness
Nov 24, 2026
Data Sourced
via OSV·02:55 PM
Affected Software

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-5917?

CVE-2025-5917 has been classified with a medium severity level due to the potential for memory corruption.

2

How do I fix CVE-2025-5917?

To fix CVE-2025-5917, update the libarchive library to the latest version that contains the patch for this vulnerability.

3

What impact does CVE-2025-5917 have on affected systems?

CVE-2025-5917 can lead to a 1-byte write overflow, which may result in memory corruption and unpredictable application behavior.

4

Which systems are affected by CVE-2025-5917?

CVE-2025-5917 affects systems that utilize the libarchive library for handling file archives.

5

Is CVE-2025-5917 easy to exploit?

Exploitation of CVE-2025-5917 may require an attacker to manipulate file names, making it potentially easy to exploit in certain environments.

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