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

16 affected componentsFixes available
Libarchive libarchive<3.8.0
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
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 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
Microsoft cbl2 libarchive 3.6.1-6<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-19<3.21.4-20
3.21.4-20
Microsoft cbl2 cmake 3.21.4-18

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 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
RemedyDescriptionSeverityWeaknessAffected Software
Sep 3, 2025
Data Sourced
via Microsoft·11:25 PM
DescriptionSeverityWeaknessAffected Software
Sep 4, 2025
Updated
via Microsoft·06:25 AM
Affected Software
Updated
via Microsoft·06:25 AM
SeverityAffected Software
Updated
via Microsoft·06:25 AM
DescriptionSeverity

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