A security hole has been identified in Anthropic’s Claude which could allow an attacker to run malicious code on Linux by persuading the system to run a malicious file. AIR Security identified the security problem, which impacts on the genuine AI skills available for Word, PowerPoint and Excel for Claude.
A supporting programme (soffice.py) is used by Claude to transform and manipulate files and even to produce PDF versions of Word documents.
Where it is unable to open Unix domain sockets, it employs Linux’s LD_PRELOAD function to pre-load a shared library.
Whilst investigating, AIR Security observed that soffice.py looks for a library known as lo_socket_shim.so in a shared temporary directory. Crucially, it does not assess the origin or nature of this library.
Therefore, an attacker could introduce a malicious library to this directory and persuade LibreOffice to run it when a file is manipulated. Code would then run under the permissions of the user using Claude.
AIR Security noted that an attacker can introduce a malicious file ahead of an employee requesting Claude to manipulate or generate a file. Furthermore, they showed that a seemingly genuine AI skill can also be used to decompress a file into the temporary directory. The file can then be subsequently loaded by the manipulation function.
Whilst Unix sockets are limited on some Linux set-ups – such as some container security set-ups and the Claude Code sandbox – macOS is unaffected as it does not use the same method for pre-loading libraries.
AIR Security emphasised that even though AI extensions are independently trusted, combining them can give rise to security concerns.
An attacker does not necessarily even need to interface with another element to run malicious code, and can instead merely ensure that a file is introduced which a trusted extension then loads and runs.
In May, AIR Security identified the security hole and informed Anthropic. Although the firm recognised the problem, it reportedly believed it lay beyond its security remit as the relevant code is sandboxed. Nevertheless, the investigation showed that soffice.py still accesses the same file and fails to confirm the genuineness of the library concerned.
Whilst sandboxing is often viewed as providing security, AIR Security’s CTO and co-founder Niv Hoffman contends that it does not fully achieve this. Attackers could still run code under a user’s permissions and also gain access to files in the sandbox. To date, Anthropic has not stated what remedial action it is taking.
The researchers advise that firms should record the AI skills and extensions in use across staff accounts.
Official extensions should be analysed just as thoroughly as third-party software and security patches implemented where issues are identified.
As companies continue to embed AI assistants into routine business activity, the Office Party security hole emphasises the need to recognise AI agent extensions as software and not as inherently trustworthy. Problems in the ancillary systems underpinning AI assistants may offer further avenues for attackers to infiltrate a business’s IT infrastructure.
