Skip to content

๐Ÿ›ก๏ธ Sentinel: [CRITICAL] ํ˜ธ์ŠคํŠธ ํ—ค๋” ์ธ์ ์…˜ ์ทจ์•ฝ์  ์ˆ˜์ •#218

Merged
seonghobae merged 2 commits into
developmentalfrom
sentinel-fix-host-header-injection-2582016819372837864
Jul 12, 2026
Merged

๐Ÿ›ก๏ธ Sentinel: [CRITICAL] ํ˜ธ์ŠคํŠธ ํ—ค๋” ์ธ์ ์…˜ ์ทจ์•ฝ์  ์ˆ˜์ •#218
seonghobae merged 2 commits into
developmentalfrom
sentinel-fix-host-header-injection-2582016819372837864

Conversation

@seonghobae

Copy link
Copy Markdown

๐Ÿšจ Severity: CRITICAL
๐Ÿ’ก Vulnerability: API ๊ฒฝ๋กœ ๋‚ด๋ถ€์—์„œ ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์กฐ์ž‘ ๊ฐ€๋Šฅํ•œ ํ˜ธ์ŠคํŠธ ํ—ค๋”๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์ ˆ๋Œ€ ๊ฒฝ๋กœ(req.nextUrl.origin)๋ฅผ ์ƒ์„ฑํ•˜์—ฌ, ๋น„๋ฐ€๋ฒˆํ˜ธ ์žฌ์„ค์ • ๋งํฌ ๋ฐ ์ธ์ฆ ์ฝœ๋ฐฑ ๊ณผ์ •์—์„œ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋Š” ํ˜ธ์ŠคํŠธ ํ—ค๋” ์ธ์ ์…˜(Host Header Injection) ์ทจ์•ฝ์ ์„ ๋ฐœ๊ฒฌํ•˜์˜€์Šต๋‹ˆ๋‹ค.
๐ŸŽฏ Impact: ๊ณต๊ฒฉ์ž๊ฐ€ ์•…์˜์ ์œผ๋กœ ํ˜ธ์ŠคํŠธ ํ—ค๋”๋ฅผ ๋ณ€์กฐํ•˜๋ฉด, ์‚ฌ์šฉ์ž๊ฐ€ ๊ณต๊ฒฉ์ž์˜ ์„œ๋ฒ„๋กœ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ๋˜์–ด ์ธ์ฆ ์ •๋ณด๊ฐ€ ํƒˆ์ทจ๋˜๊ฑฐ๋‚˜ ํ”ผ์‹ฑ ๊ณต๊ฒฉ์˜ ๋Œ€์ƒ์ด ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๐Ÿ”ง Fix: req.nextUrl.origin์˜ ์‚ฌ์šฉ์„ ์ œ๊ฑฐํ•˜๊ณ , ์‹ ๋ขฐํ•  ์ˆ˜ ์žˆ๋Š” ํ™˜๊ฒฝ ๋ณ€์ˆ˜(process.env.NEXT_PUBLIC_SITE_URL)๋ฅผ ์ฐธ์กฐํ•˜๋„๋ก ๋ณ€๊ฒฝํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ, next.config.ts ํŒŒ์ผ์— ์ค‘๋ณต์œผ๋กœ ์กด์žฌํ•˜๋˜ headers() ํ•จ์ˆ˜๋ฅผ ํ•˜๋‚˜๋กœ ํ†ตํ•ฉํ•˜์—ฌ ๋ถˆํ•„์š”ํ•œ ์˜ค๋ฅ˜๋ฅผ ์ˆ˜์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค.
โœ… Verification: pnpm test๊ฐ€ ํ†ต๊ณผํ•˜์˜€์œผ๋ฉฐ, pnpm build ๊ณผ์ •์—์„œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š์Œ์„ ํ™•์ธํ•˜์˜€์Šต๋‹ˆ๋‹ค.


PR created automatically by Jules for task 2582016819372837864 started by @seonghobae

- `packages/web/src/app/api/admin/password-reset-links/route.ts` ๋ฐ `packages/web/src/app/api/auth/cli-request/route.ts`์—์„œ ํ˜ธ์ŠคํŠธ ํ—ค๋” ์ธ์ ์…˜์— ์ทจ์•ฝํ•œ `req.nextUrl.origin` ์‚ฌ์šฉ์„ ์ œ๊ฑฐํ•จ
- ๋Œ€์‹  ๊ฒ€์ฆ๋œ ํ™˜๊ฒฝ๋ณ€์ˆ˜์ธ `process.env.NEXT_PUBLIC_SITE_URL`๋ฅผ ์‚ฌ์šฉํ•˜๊ณ , ๋Œ€์ฒด๊ฐ’์œผ๋กœ 'https://argos-ai.xyz'๋ฅผ ์ ์šฉํ•จ
- `packages/web/next.config.ts` ํŒŒ์ผ์˜ ์ค‘๋ณต๋œ `headers()` ๋ธ”๋ก์„ ์ •๋ฆฌํ•˜๊ณ  ๋ณด์•ˆ ์ •์ฑ…(Permissions-Policy)์„ ํ†ตํ•ฉํ•จ
- `.jules/sentinel.md` ์— ํ•ด๋‹น ์ทจ์•ฝ์ ๊ณผ ํ•™์Šต ๋‚ด์šฉ์„ ํ•œ๊ตญ์–ด๋กœ ๊ธฐ๋กํ•จ
@google-labs-jules

Copy link
Copy Markdown

๐Ÿ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a ๐Ÿ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

โ€ฆhost-header

# Conflicts:
#	.jules/sentinel.md
#	packages/web/next.config.ts
#	packages/web/src/app/api/admin/password-reset-links/route.ts
#	packages/web/src/app/api/auth/cli-request/route.ts
#	pnpm-lock.yaml
@seonghobae seonghobae merged commit 19bb225 into developmental Jul 12, 2026
3 checks passed
@seonghobae seonghobae deleted the sentinel-fix-host-header-injection-2582016819372837864 branch July 12, 2026 19:02
@github-project-automation github-project-automation Bot moved this from Todo to Done in naruon Platform Roadmap Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant