Impact
The cohere‑python SDK between versions 5.11.0 and 7.2.0 has a path traversal flaw when extracting tar archives from S3. The extraction routine calls tarfile.extractall without validating the archive paths, allowing an attacker who can write a model archive to the victim's S3 prefix to include absolute or upward path references. This can overwrite arbitrary files on the host running the SDK. The weakness is a classic directory traversal vulnerability (CWE‑22) and grants the victim the ability to modify or replace local files, potentially leading to data corruption or execution of arbitrary code if system binaries are overwritten.
Affected Systems
The affected product is Cohere AI's cohere‑python library, specifically versions 5.11.0 through 7.2.0. Systems that import this library to load or serve models from Amazon S3 are at risk unless they are using a newer, patched release.
Risk and Exploitability
The CVSS score of 5.9 indicates a medium severity, and the lack of an EPSS value means current exploit probability cannot be assessed. The vulnerability would only be exploitable if an attacker can write model archives to the configured S3 prefix, which may be feasible in environments where S3 write access is granted to untrusted workloads. Because the flaw allows overwriting files on the host, it could be used to compromise the system if critical configuration or system files are affected. The vulnerability is not listed in the CISA KEV catalog, but its medium CVSS and potential persistence through S3 write access warrant timely remediation.
OpenCVE Enrichment