AIDEFEND in Action AIA-0190 Incident

hermes-px: A Fake Privacy AI Proxy on PyPI Copied Users' Prompts and Impersonated a University's Chat Page

The hermes-px package advertised private access to AI models. JFrog and SafeDep found that it sent requests to a university's chat service and copied prompts and replies to a database controlled by the package operator. That second connection also exposed the caller's real IP address. The reports do not establish how many users installed the package or sent data through it.

Malicious PackagesData ExfiltrationPackage VettingIdentity & AccessAI Supply Chain
7 applicable AIDEFEND defenses

Threat Analysis

  • The lure: a keyless, anonymous AI library. hermes-px was published under the name EGen Labs with a polished README: installation steps, a migration guide from the OpenAI SDK, error-handling documentation and a RAG (retrieval-augmented generation, where relevant documents are fetched and handed to the model with the question) pipeline feature. Its interface mirrored the OpenAI Python SDK, so switching required almost no code changes, and it promised Tor routing with no API key. SafeDep found no install hooks: the malicious code starts when a developer imports the package and creates its Hermes() client. The README's "Interactive Learning CLI" section also told users to run a one-line command that downloads a Python script from GitHub and executes it, which JFrog notes would have let the attacker change the code users ran without publishing a new version; that GitHub organization now returns 404.
  • Where the requests actually went: a university's chat service. The package hands each request to a local Tor SOCKS5 proxy (127.0.0.1:9050), which carries it to the chat-completions API of a university AI chat service. The request carries forged Host, Origin and Referer headers so it looks like a browser session on the university's own chat page; SafeDep adds that it copies a full Chrome 146 browser fingerprint, including User-Agent and Sec-Ch-Ua, to get past the WAF (web application firewall) in front of the endpoint. From domain ownership, IP registration and the advising instructions bundled in the package, JFrog attributes the endpoint to a private university in Tunisia: a live academic-advising chatbot behind Azure WAF, whose API was never intended for public access. Both JFrog and SafeDep call the endpoint hijacked; JFrog also says the package abuses this real internal service, and SafeDep says the attacker gained access to it. Neither source describes an intrusion beyond these forged requests or names the model behind the endpoint. SafeDep also notes that the advertised "5-layer Tor proxy chain" is only a label, with no multi-hop logic in the code.
  • Every conversation was written into the attacker's database. A telemetry feature, on by default (HERMES_TELEMETRY=1), runs in a background thread after each request and writes the model name, the user's original messages (without the system prompts the package adds) and the full model reply into a requests_log table in the attacker's Supabase project, using an API key hardcoded in the package. That request goes out directly, not through Tor, so it also exposes the user's real IP address, the opposite of the anonymity the package advertised. The README mentions turning off "fire-and-forget Supabase tracking" only in a configuration table, without saying what is collected, that it bypasses Tor or that it reveals the IP address. SafeDep reports that the table had Row Level Security (a database setting that restricts which rows each caller can read or write) disabled, and that querying it with the embedded key showed 19 conversations collected between April 1 and April 3, 2026. The sources do not say whose conversations these were, and no download or victim counts have been published.
  • A hidden system prompt in, rewritten replies out. Before the user's message, every request carries a system prompt (the instructions that set the model's role and behavior) of about 246,000 characters. JFrog identifies it as a leaked system prompt of Claude Code (Anthropic's AI coding tool) altered by find-and-replace, with "Claude" renamed AXIOM-1 and "Anthropic" renamed EGen Labs; two more system messages carry the kind of instructions JFrog says a university academic-advising chatbot would use. On the way back, the package replaces "OpenAI" with "EGen Labs" and "ChatGPT" with "AXIOM-1" in replies and turns quota-exceeded errors into a generic "model offline" message, which JFrog says keeps users from realizing their requests reach a hijacked university endpoint. The target address, headers, system prompts and Supabase key are hidden under XOR, zlib and base64 layers decoded only in memory at runtime, which JFrog says keeps naive static string scanning from flagging the malicious endpoints; SafeDep's YARA rules flagged only the README's download-and-run command.
  • Versions and current status. SafeDep's analysis lists versions 0.0.1 to 0.0.4, all uploaded on April 3, 2026 (UTC) within 46 minutes, with the malicious core unchanged from 0.0.1; later versions added the reply rewriting, the quota-error handling and the README command. SafeDep's package record separately lists 0.1.0 as a malicious version. JFrog publishes no versions or download counts and says JFrog Xray and Curation detect the package as XRAY-961094. On December 1, 2026, PyPI no longer served a project named hermes-px; the removal date has not been published. Any installed version should be treated as malicious.

Applicable AIDEFEND Defenses (7)

AID-I-002.002
Secure External AI Service Connectivity
Very High
hermes-px needed two outbound paths to work: a Tor connection that carried prompts to the university endpoint, and a direct HTTPS request that wrote each conversation into the attacker's Supabase table. On hosts and containers that run AI client code behind a controlled egress point, a default-deny policy that admits only the FQDNs of approved model providers or the organization's own AI gateway blocks both: the package gets no answers and cannot copy conversations out, and each attempt shows up in firewall or proxy logs as a connection to an unapproved destination. Protection ends at that egress point, so developer laptops and personal notebooks with open internet access stay exposed. An allowlist entry for all of supabase.co, or an allowed general-purpose proxy that forwards anything, defeats the block.
AID-H-022.002
Pre-Merge Dependency Change Risk Review
High
A required dependency review before merge would have found little to approve: SafeDep reports no author email, repository URL or homepage for hermes-px, and four releases uploaded within 46 minutes on the day it appeared. Under this review's contract, a package without a source repository, or one the reputation and behavior analyzer cannot assess, returns insufficient data, which never counts as a pass, so a change that adds hermes-px stays blocked unless someone records an exception. The review only sees dependency changes made through reviewed repositories; a developer who runs pip install in a notebook or on a laptop never reaches it.
AID-I-001.005
Safe Ephemeral Detonation & Attested Raw Observation Reporting
High
Reading the code was not enough here: JFrog found the target address, headers, system prompts and Supabase key stored under XOR, zlib and base64 layers decoded only in memory, which it says keeps naive static string scanning from flagging the malicious endpoints. Running a candidate AI client library once in a disposable sandbox with no real credentials, sending it a test prompt, and forcing every connection through a monitored proxy under a strict behavioral policy turns its runtime behavior into a finding. For hermes-px that finding is an attempt to reach a local Tor proxy and, once a test call completes, a direct request that writes the prompt and reply into a Supabase table, neither of which matches the model endpoint a privacy proxy documents. The sandbox only reports; the admission decision has to reject the package, and code paths the test call does not exercise stay unobserved.
AID-E-003.003
Confirmed Malicious Code & Persistence Eviction
High
Once hermes-px is confirmed anywhere, removal has to reach every place that can load it: requirements and lock files, virtual environments, notebook kernels, CI runners and container images. Remove it from those sources, rebuild images without it, deny its file hashes in package admission, and verify from a separate inventory that no environment still resolves or loads it. Running processes need the same attention: the telemetry thread lives inside any Python process that imported the package, so that process keeps sending each new conversation it handles until it is restarted, even after pip uninstall. Eviction stops further collection; conversations already in the attacker's table cannot be recalled.
AID-E-001.001
Root & Long-Lived Credential Object Eviction
High
Every conversation the package handled was copied to the attacker, so any password, API key, token or connection string a user typed into a prompt has to be treated as disclosed, as both JFrog and SafeDep advise. After identifying who used the package and reviewing what they sent, each credential's owner revokes it at the service that issued it, issues a replacement to every consumer, and confirms the old value is rejected. That ends any later use of those credentials. The sources do not report collected credentials being used, internal URLs, code and personal data in the same prompts cannot be revoked, and the framework's worked example covers an AWS IAM key, so other credential types need their own procedure.
AID-H-004.002
Service & API Authentication
High
hermes-px got answers from the university's chat API by forging the Host, Origin and Referer headers, and per SafeDep a Chrome browser fingerprint, so its requests looked like the university's own chat page; SafeDep says this was done to get past the WAF. Those headers only describe a browser context, and any script can set them, so they never identify the caller. If the model API instead accepts only callers holding a credential the service issues, such as an OAuth client-credentials token held by the chat application's own backend and checked for issuer, audience, expiry and scope on every request, a script that copies the page's headers is refused before the model runs. Where the chat page itself is open to anonymous visitors, the same abuse can move to that page's backend, which then needs its own limits; the sources do not describe the service's intended audience.
AID-D-005.007
Token, Tool-Use, Request-Parameter & Cost Spike Detection & Alerting
Medium
Every hermes-px request placed a roughly 246,000-character system prompt ahead of the user's message, far more input than an academic-advising page sends. Recording input tokens per request at the model API, with exact caller and route kept in the protected event stream, and alerting when per-request input size or total token consumption breaks the endpoint's historical baseline, gives the operator a signal even when the headers look like its own page. It detects after requests are served and blocks nothing; when abusive volume is small an aggregate threshold may not trip, so per-request size outliers carry more of the signal than totals.

What Defenders Should Do Now

  • Find and remove hermes-px, then restart what used it. On developer machines, notebook environments, CI runners and container images, run pip show hermes-px and search requirements and lock files; any version counts. Remove the package, rebuild images without it, and restart every Python process or notebook kernel that imported it, because the thread that sends conversations runs inside those processes. SafeDep also advises checking machines for a hermes.log file. The check passes when no environment lists the package and no running process has a thread named hermes-telemetry.
  • Treat everything sent through it as disclosed. Identify who used the package and review what they sent through it for passwords, API keys, tokens, internal URLs, proprietary code and personal data. Revoke and rotate every credential that appeared, at the service that issued it, and confirm the old value is rejected.
  • Search network logs, then block the exfiltration host. Search DNS, proxy and firewall logs for urlvoelpilswwxkiosey[.]supabase[.]co and for Tor connections from developer machines; each hit gives a machine and a time window whose prompts need review. Then block the host at the network edge, and remove Tor from any machine where it was installed only for this package.
  • Check where an AI client library connects before adopting it. A new AI client or proxy package should pass dependency review (publisher, source repository, release history) before it enters a project. Then run it once in a disposable environment with no real credentials, send a test prompt, and record every destination it contacts; if it reaches anything other than the model endpoint its documentation names, do not adopt it.
  • Limit where AI code can connect. On hosts and containers that run AI code, block outbound connections by default and allow only the FQDNs of approved model providers or your own AI gateway. Test from that environment: a request to an unapproved HTTPS host must fail and appear in the egress logs. Avoid wildcard entries such as all of supabase.co, where anyone can create a project, unless they are truly required.
  • If you run an LLM chat service, test your own API from outside. From a network outside your organization, write a short script that copies the Origin, Referer and User-Agent headers your chat page sends and calls the model API directly. Unless the request carries a credential your service issued, such as a signed-in user's session token or a client credential held only by your chat backend, it must be refused. Also record input size per request at the model API and alert on requests far larger than anything your own page sends.

Conclusion

The package could see each prompt and reply because it handled the model connection. AIDEFEND  points to reviewing the package before it is allowed, observing its destinations in isolation and restricting production outbound traffic. Replace any credentials exposed through the package.

Last updated: