libarchive: Unchecked Return Value
CVE-2025-25724 is a high-severity unchecked return value vulnerability in libarchive, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. Affected libarchive versions: 3.7.7 and earlier. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.37% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of libarchive you run against the affected versions below, and install the vendor's latest release.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Libarchive | libarchive | 3.7.7 and earlier | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 4.0 | Medium | CNA (mitre.org) |
| CVSS 3.1 | 7.8 | High | NVD |
Official description
list_item_verbose in tar/util.c in libarchive through 3.7.7 does not check an strftime return value, which can lead to a denial of service or unspecified other impact via a crafted TAR archive that is read with a verbose value of 2. For example, the 100-byte buffer may not be sufficient for a custom locale.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Unchecked Return Value
The product does not check the return value from a method or function.
How developers prevent this class of flaw
- Check the results of all functions that return a value and verify that the value is expected.
- For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished.
- Ensure that you account for all possible return values from the function.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Third-party and government advisories
- gist.github.com/Ekkosun/a83870ce7f3b7813b9b462a395e8ad92Third Party Advisory
Technical write-ups (may include proof of concept)
Other references
Other vulnerabilities in libarchive
- 7.5 High severity
- 7.5 High severity
- 7.8 High severity
- 7.5 High severity
- 7.8 High severity
- 7.8 High severity
Recent Unchecked Return Value vulnerabilities
- 9.1 Critical severity
- 7.5 High severity
- 7.0 High severity
- 8.8 High severity
- 7.5 High severity
- 7.6 High severity
Spotted an error? Tell us.