Skip to content

Conversation

carlospolop
Copy link
Collaborator

🤖 Automated Content Update

This PR was automatically generated by the HackTricks News Bot based on a technical blog post.

📝 Source Information

🎯 Content Summary

Target: Langfuse (open‑source LLM engineering platform).
CVE: CVE-2025-59305 (publicly disclosed September 15, 2025).
Author: Mav Levin (DepthFirst).
Core issue: Missing authorization on internal background‑migration APIs. The tRPC middleware protectedProcedure enforced authentication (valid session) but not role/permission checks, so any authenticated user (self‑serve sign‑ups enabled) could invoke admin‑level migration o...

🔧 Technical Details

Abuse background job APIs protected only by authentication: If sensitive maintenance endpoints (e.g., migrations) are gated by session checks (tRPC protectedProcedure) without role enforcement, register a normal account, enumerate jobs (e.g., backgroundMigrations.all), and invoke privileged actions (e.g., backgroundMigrations.retry). This generalizes to any framework where AuthN is mistakenly treated as AuthZ.

Force non‑idempotent migration restarts to corrupt data: Re‑invoking running migrations can create concurrent writes and inconsistent states. Repeated restarts exploit lack of idempotency/locking to cause partial migrations, silent data loss, and unreliable analytics across systems using background job runners.

DoS via worker/DB starvation: Flood heavy maintenance endpoints to overwhelm workers and database connections. Without authorization and rate limiting, internal maintenance APIs become a low‑effort ...

🤖 Agent Actions

I analyzed the blog and updated HackTricks with a focused, technical subsection covering the tRPC/Zod protectedProcedure authorization pitfall (AuthN != AuthZ), including exploitation steps, black-box heuristics, and impact. I placed it in the most relevant existing page for API testing methodology to avoid creating redundant pages.

What I did:

  • Explored repository to find the best location for “Web/API Authorization & Business Logic” content.
  • Determined that src/network-services-pentesting/pentesting-web/web-api-pentesting.md is the right place to add a subsection covering authorization/business logic testing for APIs.
  • Added a new section: “Authorization & Business Logic (AuthN != AuthZ) — tRPC/Zod protectedProcedure pitfalls” under the “Effective Tricks for API Pentesting,” with:
    • Explanation of how tRPC protectedProcedure only enforces authentication, not authorization.
    • Vulnerable code pattern example.
    • Black-box exploitation steps with curl PoCs to backgroundMigrations.all and backgroundMigrations.retry.
    • Impact analysis: data corruption via non-idempotent restarts; DoS via worker/DB starvation.
    • Detection heuristics and notes for remediation to communicate to dev teams.
  • Updated the References section to include the DepthFirst case study URL used.

Files modified:

  • src/network-services-pentesting/pentesting-web/web-api-pentesting.md

References added:

  • How An Authorization Flaw Reveals A Common Security Blind Spot: CVE-2025-59305 Case Study (DepthFirst)

No new files were created, and existing structure/style was maintained.


This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.

📚 Repository Maintenance

  • MD files processed: 896
  • MD files fixed: 1

All .md files have been checked for proper formatting (headers, includes, etc.).

@carlospolop
Copy link
Collaborator Author

🔗 Additional Context

Original Blog Post: https://www.depthfirst.com/post/how-an-authorization-flaw-reveals-a-common-security-blind-spot-cve-2025-59305-case-study

Content Categories: Based on the analysis, this content was categorized under "Generic Methodologies & Resources > Pentesting Methodology > Web/API Authorization & Business Logic (e.g., Missing AuthZ / IDOR) — add a subsection for tRPC/Zod protectedProcedure pitfalls".

Repository Maintenance:

  • MD Files Formatting: 896 files processed (1 files fixed)

Review Notes:

  • This content was automatically processed and may require human review for accuracy
  • Check that the placement within the repository structure is appropriate
  • Verify that all technical details are correct and up-to-date
  • All .md files have been checked for proper formatting (headers, includes, etc.)

Bot Version: HackTricks News Bot v1.0

@carlospolop
Copy link
Collaborator Author

merge

@carlospolop carlospolop merged commit ef576d4 into master Oct 4, 2025
@carlospolop carlospolop deleted the update_How_An_Authorization_Flaw_Reveals_A_Common_Securit_20251001_125513 branch October 4, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant