High
Security advisory
A vulnerability in the Gemini CLI prior to version 0.39.1 allows attackers to achieve arbitrary code execution by tricking a victim into starting the CLI within an untrusted directory. The vulnerability is triggered via untrusted .env files overriding GEMINI_CLI_HOME to load malicious configuration files and bypass folder trust prompts.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-13745
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:07 UTC · Revision 1
Source evidence
A vulnerability in the Gemini CLI prior to version 0.39.1 allows attackers to achieve arbitrary code execution by tricking a victim into starting the CLI within an untrusted directory. The vulnerability is triggered via untrusted .env files overriding GEMINI_CLI_HOME to load malicious configuration files and bypass folder trust prompts.
osv:CVE-2026-13745
Complete source record
{
"id": "993af421e4b84be171c5371e9437989d793a3f1fafe47af06d9c2a3ccc64fb8f",
"url": "https://osv.dev/vulnerability/CVE-2026-13745",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2026-13745",
"summary": "A vulnerability in the Gemini CLI prior to version 0.39.1 allows attackers to achieve arbitrary code execution by tricking a victim into starting the CLI within an untrusted directory. The vulnerability is triggered via untrusted .env files overriding GEMINI_CLI_HOME to load malicious configuration files and bypass folder trust prompts.",
"evidence": "osv:CVE-2026-13745",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-13745",
"aliases": [
"CVE-2026-13745"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Amber"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/google-gemini/gemini-cli",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "4d73f3413949ae5c638804c5eac27a9bcd0567ca"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "0.39.1"
}
],
"source": "DESCRIPTION"
},
{
"range": [
{
"fixed": "4d73f3413949ae5c638804c5eac27a9bcd0567ca"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v0.39.1"
}
]
}
}
],
"versions": [
"v0.39.0",
"v0.39.0-preview.2",
"v0.39.0-preview.1",
"v0.39.0-preview.0",
"v0.1.12",
"v0.1.9-nightly.250705.e90e0015",
"MK_TAG_TEST",
"v0.1.9+nightly.040725.ef736f0d",
"v0.1.9+nightly.040725.adc63e68",
"v0.1.9+nightly.040725.d43ea268",
"v0.1.9",
"v0.1.8",
"v0.1.7",
"v0.1.6",
"latest",
"early-access"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-13745.json"
}
}
],
"modified": "2026-10-20T11:18:36.149613126Z",
"provider": "osv",
"references": [
"https://github.com/google-gemini/gemini-cli/releases/tag/v0.39.1",
"https://www.pwned.info/articles/homing-in-on-arbitrary-code-execution-within-gemini-cli/",
"https://www.redguard.ch/blog/2026/06/03/advisory-google-gemini-cli/"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2026-13745",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 387165,
"published_at": "2026-09-10T09:17:00.703+00:00"
}