$ cat writeup.md…
$ cat writeup.md…
tjctf
Task: Next.js App Router chat app using vulnerable React 19.x Server Components. Solution: Exploit REDACTED (React2Shell) for RCE, then extract the flag from .env in git commit history.
i vibe coded a website and told gpt to make it secure so there is nothing you can do now!!!
English summary: A Next.js App Router chat application ("yap") where users can register, login, and post messages. Built with React Server Components on React 19.x. The developer claims it was "vibe coded" (AI-generated) and secured by GPT. The goal is to find the flag hidden on the server.
5VGptBeLn4iPBWXBhhT5c)/var/lib/yap/data.dbyap_user=<username> (HttpOnly, plain text)/Login: 40cecd84ea8f6a2e4fc21505453351fd6313e28428
Register: 40ed6c0b53c7f99c3fa4946ff1d02a94a11906dcc9
Post yap: 401f68b86df260cd0037fbe5c9a5c671a3920b1f78
Logout: 000791216483786dde7eac56bee8877a5a2f9b928d
User 'zain' had a welcome message: "Welcome to the yap chat app! This is a pretty cool chat app 100% made by humans. Source: true me bro."
The application uses a vulnerable version of React (19.0.0–19.2.x) with React Server Components. CVE-2025-55182 is a critical Remote Code Execution vulnerability that allows an attacker to execute arbitrary code on the server by sending specially crafted HTTP requests to Server Function endpoints via the RSC Flight protocol.
Related CVEs in the same family:
References:
The page source reveals Next.js App Router with React Server Components (Flight protocol visible in self.__next_f.push() calls). Server action IDs with $ACTION_ID_ prefix confirm RSC server actions are in use. The React version (19.x) is vulnerable to CVE-2025-55182.
The CVE allows pre-auth RCE through prototype chain traversal in the Flight protocol. By crafting a malicious RSC payload targeting the server action endpoints, arbitrary commands can be executed on the server.
With shell access on the server:
.git repository.env was present in an earlier commit but later removed.env contained FLAG=tjctf{...}The flag was found in git commit 0692a5a01fa58dfd28e1e449a3e876c2f62162b0:
.env:1:FLAG=tjctf{REDACTED}
#!/usr/bin/env python3 """ vibecoded - TJCTF 2026 Exploit CVE-2025-55182 (React2Shell) for RCE on Next.js RSC app """ import requests TARGET = "https://vibecoded.tjc.tf" # Server action IDs discovered from page source POST_ACTION = "401f68b86df260cd0037fbe5c9a5c671a3920b1f78" # Step 1: Exploit CVE-2025-55182 via Flight protocol # The vulnerability allows prototype chain traversal in RSC deserialization # to achieve arbitrary code execution on the server # Step 2: With RCE, enumerate git history # git log --all --oneline # git log --diff-filter=D -- .env # git show <commit>:.env # Step 3: Extract flag from removed .env file # git show 0692a5a01fa58dfd28e1e449a3e876c2f62162b0:.env # Output: FLAG=tjctf{REDACTED}
dangerouslySetInnerHTML only used for error page CSS$ cat /etc/motd
Liked this one?
Pro unlocks every complete writeup and expanded API access. $9/mo.
$ cat pricing.md$ grep --similar