CVE-2026-19245 in nanobotinfo

Summary

by MITRE • 08/07/2026

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".

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 08/07/2026

The vulnerability identified in HKUDS nanobot version 0.2.1 represents a critical information disclosure flaw within the Login-shell Environment Handler component. This issue resides in the ExecTool._prepare_command function located in nanobot/agent/tools/shell.py, where improper handling of shell environment variables creates an attack vector for local privilege escalation and data exposure. The flaw stems from the system's default behavior of reintroducing environment variables through shell startup files when command execution defaults to a login shell, potentially exposing sensitive information to unauthorized local users. The vulnerability has been actively exploited in the wild, with published exploits available that leverage the local access requirement to execute malicious payloads.

The technical implementation of this vulnerability demonstrates a classic case of improper environment variable handling within shell execution contexts. When commands are executed without explicit login shell invocation, the system's default behavior inadvertently reintroduces potentially sensitive environment variables through shell initialization files. This creates an information disclosure scenario where local attackers can extract confidential data that should remain isolated within secure execution contexts. The vulnerability maps directly to CWE-200 (Information Exposure) and CWE-78 (Improper Neutralization of Special Elements used in OS Command) categories, with potential ATT&CK mappings to T1059.004 (Unix Shell) and T1566 (Phishing).

The operational impact of this vulnerability extends beyond simple information disclosure, as it fundamentally compromises the security boundaries of the nanobot environment. Local attackers with minimal privileges can exploit this flaw to extract sensitive data from shell environments, potentially including authentication tokens, system configurations, or other confidential information. The patch addressing this issue requires upgrading to version 0.3.0, which implements a critical behavioral change in how the system handles shell execution defaults. This upgrade specifically addresses the problematic default behavior by ensuring that exec does not use a login shell unless explicitly requested, thereby eliminating the unintended environment variable re-introduction mechanism.

The project maintainers demonstrated exceptional professionalism in their response to this vulnerability report, acknowledging the core issue related to shell startup file handling and implementing a targeted fix rather than simply patching symptoms. Their approach of changing the default behavior from automatic login shell invocation to explicit request-based execution represents a robust security hardening measure that prevents similar issues from occurring in the future. The remediation strategy effectively addresses the root cause by modifying the fundamental execution model to prevent unintended environment variable leakage while maintaining functionality for legitimate use cases where explicit login shell behavior is required. This change aligns with security best practices for privilege management and information flow control, ensuring that security boundaries are properly maintained during command execution operations.

Responsible

VulDB

Disclosure

08/07/2026

Moderation

accepted

CPE

ready

Exploit

Download

EPSS

0.00000

KEV

no

Activities

low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!