Executive brief
Langfuse, an open-source platform for managing Large Language Model (LLM) engineering, contains a security flaw in how it handles LLM connections. A low-privileged user already belonging to a project could redirect connection tests to a server they control, causing the platform to leak sensitive LLM API keys. This could allow an internal user to steal expensive or private API credentials used by the organization.
Technical details
A role-based access control (RBAC) vulnerability exists in the LLM connection update flow of Langfuse. Authenticated users with the 'member' role can initiate a 'testUpdate' request for an existing LLM connection and modify the 'baseUrl' to an arbitrary attacker-controlled endpoint. Because the application logic reused stored encrypted secrets (such as API keys and extra headers) during these test requests, the plaintext credentials would be forwarded to the new URL. The fix enforces stricter 'llmApiKeys:update' permissions and prevents the reuse of stored secrets when the base URL is changed during a test operation.
Affected products
- Langfuse Langfuse 3.68.0 to 3.167.0
Timeline
- 2026-04-08: patched: Initial fix for permission enforcement merged
- 2026-04-09: patched: Secondary fix to prevent secret reuse on URL change merged
- 2026-05-08: disclosed: CVE-2026-41487 published
References
- https://github.com/langfuse/langfuse/commit/7527bb0d84bc0a3dc24a4b16d22ed2e46e6dddff
- https://github.com/langfuse/langfuse/commit/e12386f9d4368bbfff24a4ad7fd53641091605ff
- https://github.com/langfuse/langfuse/pull/13027
- https://github.com/langfuse/langfuse/pull/13055
- https://github.com/langfuse/langfuse/releases/tag/v3.167.0
- https://github.com/langfuse/langfuse/security/advisories/GHSA-2524-j966-gfgh