Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] 호슀트 헀더 μΈμ μ…˜ 취약점 μˆ˜μ •#218

Open
seonghobae wants to merge 1 commit into
developmentalfrom
sentinel-fix-host-header-injection-2582016819372837864
Open

πŸ›‘οΈ Sentinel: [CRITICAL] 호슀트 헀더 μΈμ μ…˜ 취약점 μˆ˜μ •#218
seonghobae wants to merge 1 commit 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant