Skip to main content

Cohere Python SDK CVE-2026-108597

| EUVDEUVD-2026-96395 MEDIUM
Path Traversal (CWE-22)
2026-10-10 VulnCheck GHSA-rg44-2cq2-qx25
5.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain write access to victim S3 prefix
  2. Exploit
    Upload malicious model tar with ../ members
  3. Execution
    SDK tarfile.extractall writes outside target dir
  4. Impact
    Overwrite host files for code execution

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concrete conditions: (1) the victim uses the Cohere Python SDK cohere_aws SageMaker flow that calls _s3_models_dir_to_tarfile and extracts model archives via tarfile.extractall; (2) the attacker can write model archives (tar files) into the victim's S3 prefix/bucket that the SDK reads from - a trusted-write position, not open network access; and (3) the victim host must trigger the extraction (passive user interaction, UI:P). Limiting factors: this is NOT remote unauthenticated exploitation against a default configuration - it depends on using the specific SageMaker model-archive feature, on the attacker holding write access to the model S3 location, and on running an affected SDK version (5.11.0 through 7.2.0). The crafted-archive-plus-write-access requirement (reflected as AT:P/PR:L) substantially narrows realistic exploitation.

Impact

This is a medium-severity, precondition-heavy integrity flaw rather than a broad remote threat. The authoritative CVSS 4.0 vector (base 5.9) reports AV:N but pairs it with AT:P (a specific attack requirement), PR:L (attacker needs some privilege), and UI:P (passive victim interaction), with impact limited to VI:H and VC:N/VA:N - i.e., arbitrary file write/overwrite, no direct confidentiality or availability loss. The gating precondition is decisive: the attacker must already be able to write model archives into the victim's S3 prefix, which is a trust-boundary/supply-chain position, not open internet access, so the AV:N 'network' label overstates reachability for most deployments. No EPSS score was provided, there is no CISA KEV listing, and no turnkey exploit code is indicated in the input (a technical writeup exists on hackmd, but that is analysis, not confirmed POC code). Taken together the signals point to a targeted, conditional issue affecting a specific Cohere AWS SageMaker code path - a genuine priority only for organizations that use that SageMaker model-archive flow and load archives from an S3 location an attacker could influence; for everyone else it is a lower real-world priority than the 5.9 might suggest.

Exploit ScenarioDerived

An attacker who can write objects to the S3 prefix the victim loads Cohere SageMaker model archives from uploads a crafted tar containing members with '../' sequences or absolute paths. When the Cohere Python SDK host later calls tarfile.extractall in _s3_models_dir_to_tarfile, those members are written outside the intended directory, overwriting arbitrary files on the host and potentially leading to code execution. A technical writeup describing the tar-slip technique is publicly available, but no confirmed weaponized exploit is indicated in the input.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 10, 2026

Arbitrary file write in the Cohere Python SDK 5.11.0 through 7.2.0 arises from unvalidated tar archive extraction in the _s3_models_dir_to_tarfile helper used by the SDK's cohere_aws SageMaker integration. An attacker who can place a crafted model archive into the S3 prefix the SDK reads from can embed absolute paths or ../ traversal members that, once tarfile.extractall runs on the victim host, overwrite files outside the intended model directory. Exploitation is precondition-heavy: it requires the affected SageMaker model-archive flow to be in use, attacker write access to the victim's S3 model location, and the victim to trigger the extraction (passive user interaction); there is no public exploit identified at time of analysis and no confirmed actively exploited (CISA KEV) status. EPSS and KEV data were not provided, and the impact is scored as integrity-only (no confidentiality or availability effect), making this a medium-severity, precondition-dependent flaw.

RemediationAI

No vendor-released patch identified at time of analysis, so the primary action is to stop relying on the vulnerable extraction path: upgrade to a Cohere Python SDK release newer than 7.2.0 if and when one is published, and track the project repository at https://github.com/cohere-ai/cohere-python and the VulnCheck advisory at https://www.vulncheck.com/advisories/cohere-python-sdk-5.11.0-through-7.2.0-path-traversal-via-sagemaker-tar-extraction for fix confirmation. Until then, apply targeted compensating controls: (1) sanitize archives before extraction by pre-scanning tar members and rejecting absolute paths, '..' components, and symlinks/hardlinks (this requires maintaining a local wrapper around the SageMaker model-loading flow, at the cost of custom code that must be kept in sync with SDK updates); (2) tighten S3 permissions so the IAM principal used by the SDK has read-only access to the model prefix and no untrusted principal can PutObject into it - this closes the trusted-write prerequisite but fails if a shared or attacker-influenced bucket is unavoidable; (3) run the SDK extraction inside a container or sandbox whose writable filesystem is restricted to the model directory, mounted read-only elsewhere, and running as a non-privileged user, which limits overwrite targets such as cron files, SSH authorized_keys, or shell profiles; and (4) pin or constrain the SDK version and monitor S3 access logs for unexpected PutObject events against the model prefix as a detection control.

Affected VersionsENISA

cohere-python 5.11.0 ≤7.2.0

Affected Packages

euvd cohere_python no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability is a classic tar-slip / path traversal (CWE-22) in the Cohere Python SDK's AWS SageMaker workload path. The affected code lives in src/cohere/manually_maintained/cohere_aws/client.py around lines 101-123, in the function _s3_models_dir_to_tarfile, which materializes model archives retrieved from an S3 prefix and extracts them with Python's tarfile.extractall. Because Python's extractall does not sanitize member names by default in the affected versions, a tar entry containing an absolute path (e.g. /home/user/.bashrc) or a relative traversal (e.g. ../../etc/cron.d/x) causes the archive member to be written outside the designated extraction directory. The CPE cpe:2.3:a:cohere-ai:cohere-python:*:*:*:*:*:*:*:* references the cohere-python package, and the issue maps to the AWS SageMaker model-loading workflow where archives are trusted implicitly because they originate from an S3 location assumed to be controlled by the victim. The trust boundary failure is that S3 write access to the model prefix is treated as equivalent to filesystem safety on the extraction host. The provided CVSS:4.0 vector (AT:P/PR:L/UI:P, VI:H, with no confidentiality or availability impact) and the independent CVSS:3.1 assessment (AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N) both reflect an integrity-only impact gated on attack preconditions.

Know when Cohere Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 4.8 MEDIUM

Attacker needs write access to the S3 prefix (PR:L) and a crafted archive plus victim-triggered extraction (AC:H, UI:R); impact is arbitrary file overwrite (I:H) with no direct confidentiality or availability loss.

3.1 AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Red Hat 4.8 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Cohere Python SDK 5.11.0 through 7.2.0 contains a path traversal (tar slip) vulnerability in _s3_models_dir_to_tarfile that allows arbitrary file write via unvalidated tarfile.extractall calls. Attackers who can write model archives to the victim's S3 prefix can include absolute paths or ../ members to overwrite files on the SDK host.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
Low
vendor AI SDK; affected AWS SageMaker tar path is niche feature
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy