Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain local low-privilege access to nanobot host
-
DeliveryInvoke ExecTool.execute() shell command
-
ExploitLogin shell flag (-l) passed to bash/zsh
-
ExecutionStartup files sourced, sensitive env vars re-exported
-
PersistRead exposed credentials or API tokens from spawned process environment
-
ImpactExfiltrate or reuse disclosed secrets
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK
2 techniques across 2 tactics: Collection, Discovery The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires (1) local non-remote access to the system where nanobot is installed, and (2) low-privilege authenticated access sufficient to invoke |
| Impact | The CVSS 4.0 base score of 1.9 with vector AV:L/AC:L/AT:N/PR:L/UI:N/VC:L accurately reflects the limited real-world risk of this vulnerability. Local access is mandatory (AV:L), which immediately eliminates remote exploitation scenarios. Low-privilege access is required (PR:L), meaning anonymous or network-only actors cannot exploit this. The confidentiality impact is bounded at Low (VC:L) - environment variable leakage rather than arbitrary file read or full credential extraction. EPSS data was not provided in the available intelligence sources, so exploitation probability cannot be quantified beyond the CVSS signal. No CISA KEV listing confirms this has not been observed in active exploitation campaigns. A publicly available POC exists on GitHub Gist, which elevates the feasibility of exploitation modestly for those who already meet the local access prerequisite. Overall, this is a genuine but low-priority vulnerability; risk is elevated only in shared multi-user environments where nanobot executes commands on behalf of users with differing privilege levels, or in containerized environments where startup-file-injected secrets might cross trust boundaries. |
| Exploit ScenarioDerived | A low-privilege local user on a system running nanobot up to 0.2.1 invokes shell commands through the agent framework's |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 07, 2026
Login-shell environment variable leakage in HKUDS nanobot up to 0.2.1 exposes sensitive environment variables to local low-privilege users during agent-driven shell command execution. The ExecTool._prepare_command function in shell.py defaulted to invoking bash/zsh with the -l (login shell) flag, causing system and user profile startup scripts to be sourced and potentially re-exporting credentials, API keys, or tokens into the execution environment where they could be read by the invoking user. A publicly available proof-of-concept exploit exists; no active exploitation has been confirmed (not listed in CISA KEV). The vendor-released fix in v0.3.0 changes the default from login-shell to non-login-shell execution.
RemediationAI
Upgrade nanobot to version 0.3.0 or later, confirmed released by the vendor at https://github.com/HKUDS/nanobot/releases/tag/v0.3.0 via PR #4525 (https://github.com/HKUDS/nanobot/pull/4525). The fix changes the default value of the login parameter from True to False across _prepare_command, _wrap_path_export, and the _PreparedCommand class descriptor, preventing automatic login-shell invocation. Note that any caller in custom integrations explicitly passing login=True will still trigger login-shell behavior and should be audited after upgrading. If immediate upgrade is not feasible, restrict nanobot shell execution access to fully trusted local users only, eliminating the privilege-separation condition that makes the disclosure meaningful. Additionally, audit shell startup files on affected systems to remove or guard any exported secrets - this mitigates impact even without patching, though it introduces maintenance overhead and does not address the root-cause default.
Affected VersionsENISA
Affected Packages
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
nanobot is an AI agent framework from the HKUDS research group (Hong Kong University of Science and Technology Data Science Lab) that provides shell command execution via the ExecTool class in nanobot/agent/tools/shell.py. The vulnerable _prepare_command function constructed shell invocations with login=True as the default, passing the -l flag to bash/zsh. Login shells source initialization files including /etc/profile, ~/.bash_profile, ~/.profile, and ~/.bashrc (via profile), which frequently set or re-export environment variables. In agent and multi-user contexts, these startup files may expose API keys, database credentials, or session tokens belonging to higher-privilege processes or other users. CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor) describes this root cause: the framework inadvertently expanded the information available to command invocations beyond what was intended, purely due to a misconfigured default in the shell initialization pathway. The CPE cpe:2.3:a:hkuds:nanobot:*:*:*:*:*:*:*:* covers all affected versions through 0.2.1. The patch diff confirms three locations where login=True was changed to login=False as the default.
Know when Nanobot 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
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P
Local access and low privilege are required to invoke nanobot shell execution; impact is limited to confidentiality of environment variables, with no integrity or availability effect.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
3DescriptionCVE.org
A flaw has been found in HKUDS nanobot up to 0.2.1. The impacted element is the function ExecTool._prepare_command of the file nanobot/agent/tools/shell.py of the component Login-shell Environment Handler. Executing a manipulation can lead to information disclosure. The attack requires local access. The exploit has been published and may be used. Upgrading to version 0.3.0 is sufficient to resolve this issue. This patch is called 4525. The affected component should be upgraded. Multiple issues were reported to the project. They reacted with a high level of professionalism and kindness: "The report concerns shell startup files reintroducing environment variables when command execution defaults to a login shell. The default was changed so exec does not use a login shell unless explicitly requested".
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Cross-Site WebSocket Hijacking in nanobot personal AI assistant (versions before 0.1.5) allows remote websites to establ
Remote code execution in nanobot personal AI assistant (versions prior to 0.1.6) allows unauthenticated attackers to exe
Arbitrary file write in HKUDS Nanobot's WhatsApp bridge (versions 0.1.5.post3 and prior) allows remote unauthenticated a
Server-side request forgery in Nanobot (HKUDS) prior to 0.2.1 lets unauthenticated remote attackers exfiltrate Microsoft
Argument injection in HKUDS nanobot's ExecTool shell execution guard allows remote unauthenticated attackers to bypass t
OS command injection in HKUDS nanobot 0.2.0 and 0.2.1 allows a low-privileged remote attacker to bypass the configured s
Server-side request forgery in HKUDS nanobot up to 0.2.1 allows authenticated remote attackers to make the server issue
MCP resource and prompt wrappers in HKUDS nanobot 0.2.0 and 0.2.1 bypass operator-defined `enabledTools` access restrict
Nanobot's Matrix channel media download handler exhausts process memory and bandwidth when authenticated room members su
Server-side request forgery in Nanobot's web_fetch tool prior to v0.2.1 allows authenticated remote attackers to probe a
Shell command injection bypass in HKUDS nanobot 0.2.0-0.2.1 allows authenticated users to evade the ExecTool allow/deny
EUVD-2026-54676
GHSA-hfxr-wggc-4cr6
NVD
CVE.org
EPSS
VulDB
Exploit-DB