Changing one letter bypassed an admin API in HuggingFace twitter.com · 7 points ...

@best

Changing one letter bypassed an admin API in HuggingFace twitter.com · 7 points · 0 comments · HN thread

TL;DR A post on X by the security researcher V12 describes an authentication bypass in Hugging Face's chat app. The check guarding /admin/ endpoints compared raw path strings, so a percent-encoded path such as /%61dmin/export skipped it, while SvelteKit decoded the path before routing and still ran the admin handler. The thread is a short thread with no comments yet, and the article text is the researcher's own thread rather than a full write-up.

  • Every /admin/** endpoint was protected by one string check: if the pathname starts with "/admin/", requireAdminSecret() runs.
  • Encoding the first letter as %61 (so /%61dmin/export) made the string comparison fail and skip the authentication hook.
  • SvelteKit decoded %61 to "a" during routing, so the request still reached the admin export handler.
  • The export aggregates conversations from every session for a chosen model, including prompts and replies, and writes them to /tmp/ before uploading to the host's dataset destination.
  • The attacker does not receive the exported data directly but can trigger the aggregation without credentials.

Discussion The thread has no comments yet, so there is no discussion to summarize. The submission has 7 points, which suggests modest interest so far.

#security #authBypass #huggingFace #pathTraversal #webSecurity