Junglewise Threat Intelligence

CVE-2026-56692: nanocoai NanoClaw symlink following in forwardAttachedFiles

CVE-2026-56692 · Severity: medium · CVSS 5.5 · Published 2026-06-23

Technologies: Nanocoai Nanoclaw.

Executive brief

NanoClaw, a tool used for managing AI agents, contains a security flaw in how it handles file transfers between agents. A malicious or compromised agent can trick the host system into reading and copying sensitive files from the host server by using symbolic links (shortcuts). This could allow an attacker to steal private data or configuration files from the underlying server where the agents are running.

Technical details

A symlink following vulnerability (CWE-59) exists in the `forwardAttachedFiles` function within `src/modules/agent-to-agent/agent-route.ts`. The application validated attachment filenames using only `isSafeAttachmentName` before performing a file copy via `fs.copyFileSync`. Because `fs.copyFileSync` follows symbolic links and the source directory is writable by the agent container, a malicious agent can create a symlink pointing to an arbitrary file on the host. When the host attempts to forward the 'attachment' to another agent, it dereferences the symlink and copies the target file's contents into the destination agent's inbox. The fix, introduced in version 2.1.17, implements `lstat` and `realpathSync` checks to ensure attachments are regular files contained within the intended directory.

Affected products

  • nanocoai NanoClaw < 2.1.17

Timeline

  • 2026-05-14: disclosed: Pull request submitted by researcher
  • 2026-06-09: patched: Fix merged into main branch
  • 2026-06-23: advisory: CVE published and NVD record created

References