CVE-2026-108597: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in cohere-ai cohere-python
Description
Cohere Python SDK versions 5.11.0 through 7.2.0 contain a path traversal vulnerability in the _s3_models_dir_to_tarfile function. This flaw allows attackers who can write model archives to the victim's S3 prefix to perform arbitrary file writes on the SDK host by including absolute or relative paths in tar archives. The vulnerability arises from unvalidated use of tarfile.extractall, enabling overwriting of files outside the intended directory.
CVSS v4.0
Score 5.9medium
Affected software
cohere-ai
cohere-python
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in cohere-python SDK (versions 5.11.0 to 7.2.0) is a path traversal (tar slip) issue in the _s3_models_dir_to_tarfile function. It occurs because the function uses tarfile.extractall without validating archive member paths, allowing crafted tar archives containing absolute paths or '../' sequences to overwrite arbitrary files on the host system. This can be exploited by attackers who have the ability to write model archives to the victim's S3 prefix, potentially leading to arbitrary file writes on the SDK host.
Potential Impact
Successful exploitation allows an attacker with write access to the victim's S3 prefix to overwrite arbitrary files on the host running the cohere-python SDK. This can lead to modification or corruption of critical files, potentially impacting system integrity and security. The CVSS 4.0 score is 5.9 (medium severity), reflecting the network attack vector, low attack complexity, partial privileges required, and user interaction needed.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade the cohere-python SDK to a version later than 7.2.0 where this issue is fixed. Since this is a cloud-hosted service, the vendor manages remediation for the cloud environment; however, for local SDK usage, applying the official fix is necessary. Check the vendor advisory for the exact patched version and update instructions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-10-10T18:25:14.161Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Is Cloud Service
- true
Threat ID: 6aca8c182cdf04f65646245d
Added to database: 10/10/2026, 19:03:52 UTC
Last enriched: 10/10/2026, 19:18:27 UTC
Last updated: 10/10/2026, 19:19:03 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.