CVE-2026-48116
Homebrew vulnerability analysis and mitigation

Overview

CVE-2026-48116 is a remote code execution (RCE) vulnerability in AnythingLLM caused by argument injection in the filesystem-search-files agent skill. The skill passes an LLM-controlled pattern parameter directly to ripgrep as a positional argument without a -- end-of-options separator, allowing a crafted pattern like --pre=/bin/sh to turn ripgrep into a script executor. All versions prior to 1.13.0 (confirmed present through v1.12.1) are affected, with the filesystem plugin enabled by default in the official Docker image. The vulnerability was published on May 28, 2026, and carries a CVSS v3.1 base score of 8.8 (High) per NVD, or 7.5 (High) per the GitHub Security Advisory (GitHub Advisory, Red Hat CVE).

Technical details

The root cause is improper neutralization of argument delimiters (CWE-88) and command injection (CWE-77) in server/utils/agents/aibitat/plugins/filesystem/search-files.js. The searchWithRipgrep function appends the LLM-supplied pattern and searchPath as positional arguments to ripgrep without a -- separator (line 341: args.push(pattern, searchPath)), so any pattern beginning with - is parsed by ripgrep as a command-line option. Specifically, --pre=/bin/sh activates ripgrep's preprocessor feature, causing it to execute /bin/sh <file> for every file it walks. An attacker combines this with the filesystem-write-text-file skill to first write a malicious shell script into the allowed directory (${STORAGE_DIR}/anythingllm-fs), then triggers its execution via the injected --pre flag. The same missing -- separator also affects searchFilesWithRipgrepGlob in the same file (GitHub Advisory, Patch Commit).

Impact

Successful exploitation grants an attacker arbitrary command execution inside the AnythingLLM server container as the server process user. The server process has read/write access to storage/anythingllm.db, which contains API keys and user password hashes, as well as the full storage directory and any mounted volumes. The attacker can also reach other services on the container network, enabling lateral movement within the deployment environment. This results in full compromise of confidentiality, integrity, and availability of the affected container (GitHub Advisory).

Exploitability

A proof-of-concept exploit with step-by-step instructions is publicly available in the GitHub Security Advisory, confirmed to work against v1.12.1 and current master at the time of disclosure. Exploitation requires only low privileges (any authenticated user with agent access in a workspace with agent mode enabled on a Docker deployment) and no user interaction. The EPSS score is approximately 0.047%, and there is no evidence of active in-the-wild exploitation or CISA KEV catalog listing as of the time of reporting. The advisory credits AlexMelanFromRingo as the reporter (GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify an AnythingLLM deployment running a version prior to 1.13.0 in Docker (where the filesystem plugin is enabled by default). Confirm agent mode is enabled in at least one workspace.
  2. Authenticate: Log in as any user account that has access to a workspace with agent mode enabled.
  3. Write malicious payload: Send an agent chat message instructing the agent to use the filesystem-write-text-file skill: @agent Use filesystem-write-text-file with path="exploit.sh" and contents="#!/bin/sh\n<payload commands>". This writes the shell script into ${STORAGE_DIR}/anythingllm-fs/exploit.sh.
  4. Trigger argument injection: Send a follow-up agent message: @agent Call filesystem-search-files with pattern="--pre=/bin/sh", mode="content", filePattern="*.sh". This causes ripgrep to be invoked with --pre=/bin/sh parsed as the preprocessor option rather than a search pattern.
  5. Achieve RCE: ripgrep walks the working directory (/app/server) recursively, executing /bin/sh exploit.sh for each .sh file it encounters, running the attacker's payload as the server process user.
  6. Post-exploitation: Use the established shell access to exfiltrate storage/anythingllm.db (containing API keys and password hashes), pivot to other container network services, or establish persistence (GitHub Advisory).

Indicators of compromise

  • Network: Unexpected outbound connections from the AnythingLLM container to external IPs, particularly following agent interactions; unusual DNS lookups or data exfiltration traffic originating from the container.
  • File System: Presence of unexpected shell scripts (e.g., exploit.sh) in ${STORAGE_DIR}/anythingllm-fs/; new or modified files in /app/server or mounted volumes created by the server process; unexpected files in /tmp (e.g., marker files like /tmp/anythingllm-rce-pwned).
  • Logs: Agent interaction logs showing filesystem-write-text-file calls followed immediately by filesystem-search-files calls with a pattern value starting with -- or -; ripgrep invocations with --pre= arguments in process logs.
  • Process: Unusual child processes spawned by the Node.js/AnythingLLM server process (e.g., /bin/sh, curl, wget, nc) visible via container process monitoring; unexpected process execution chains originating from ripgrep (GitHub Advisory).

Mitigation and workarounds

Upgrade AnythingLLM to version 1.13.0 or later, which inserts a -- separator before positional arguments in both searchWithRipgrep and searchFilesWithRipgrepGlob, and adds a defense-in-depth check that rejects any pattern beginning with -. If immediate patching is not possible, disable the filesystem plugin by unsetting or overriding the ANYTHING_LLM_RUNTIME=docker environment variable, or restrict agent access to only trusted users. The fix commit is available at 94ed62d320df1a06c229e4bc3ee09c2cb5111b33 (Patch Commit, GitHub Advisory).

Community reactions

The vulnerability was disclosed by Mintplex-Labs maintainer timothycarambat via a GitHub Security Advisory on May 21, 2026, with the CVE published on May 28, 2026. The advisory was credited to researcher AlexMelanFromRingo. Red Hat also tracked the vulnerability in their CVE database. No significant broader media coverage or notable social media discussion has been identified beyond standard CVE aggregator coverage (GitHub Advisory, Red Hat CVE).

Additional resources


SourceThis report was generated using AI

Related Homebrew vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-75874CRITICAL10
  • NixOS logoNixOS
  • cpe:2.3:a:mozilla:firefox
NoYesAug 18, 2026
CVE-2026-74990CRITICAL9.8
  • NixOS logoNixOS
  • cpe:2.3:a:mozilla:firefox
NoYesAug 18, 2026
CVE-2026-74989CRITICAL9.8
  • NixOS logoNixOS
  • cpe:2.3:a:mozilla:firefox
NoYesAug 18, 2026
CVE-2026-74988CRITICAL9.8
  • NixOS logoNixOS
  • thunderbird
NoYesAug 18, 2026
CVE-2026-73896MEDIUM6.5
  • Homebrew logoHomebrew
  • helidon
NoNoAug 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management