Skip to content

πŸ›‘οΈ Sentinel: [Medium] Fix bcrypt CPU exhaustion (DoS) vulnerability#277

Open
seonghobae wants to merge 1 commit into
developmentalfrom
sentinel/fix-bcrypt-dos-3700071408403463610
Open

πŸ›‘οΈ Sentinel: [Medium] Fix bcrypt CPU exhaustion (DoS) vulnerability#277
seonghobae wants to merge 1 commit into
developmentalfrom
sentinel/fix-bcrypt-dos-3700071408403463610

Conversation

@seonghobae

Copy link
Copy Markdown

🚨 Severity: MEDIUM

πŸ’‘ Vulnerability:
Zod λΉ„λ°€λ²ˆν˜Έ 검증 μŠ€ν‚€λ§ˆμ— μ΅œλŒ€ 길이 μ œν•œμ΄ μ—†μ—ˆμŠ΅λ‹ˆλ‹€. bcrypt ν•΄μ‹± μ•Œκ³ λ¦¬μ¦˜μ˜ νŠΉμ„±μƒ μ§€λ‚˜μΉ˜κ²Œ κΈ΄ λ¬Έμžμ—΄(수 λ©”κ°€λ°”μ΄νŠΈ λ“±)이 μž…λ ₯될 경우, ν•΄μ‹± 연산에 λ§‰λŒ€ν•œ CPU μžμ›μ΄ μ†Œλͺ¨λ©λ‹ˆλ‹€.

🎯 Impact:
μ•…μ˜μ μΈ μ‚¬μš©μžκ°€ λ¬΄ν•œνžˆ κΈ΄ λΉ„λ°€λ²ˆν˜Έ λ¬Έμžμ—΄μ„ 반볡적으둜 μ œμΆœν•˜μ—¬ μ„œλ²„μ˜ CPUλ₯Ό μ μœ ν•˜κ³ , 결과적으둜 μ„œλΉ„μŠ€ κ±°λΆ€(DoS, Denial of Service) μƒνƒœλ₯Ό μœ λ°œν•  수 μžˆμŠ΅λ‹ˆλ‹€.

πŸ”§ Fix:

  • @argos/web의 AdminLoginSchema, ResetPasswordSchema에 .max(1024) μ œν•œμ„ μΆ”κ°€ν–ˆμŠ΅λ‹ˆλ‹€.
  • @argos/shared의 LoginRequestSchema, RegisterRequestSchema에 .max(1024) μ œν•œμ„ μΆ”κ°€ν–ˆμŠ΅λ‹ˆλ‹€.
  • .jules/sentinel.md 저널에 bcrypt DoS κ΄€λ ¨ μ€‘μš”ν•œ λ³΄μ•ˆ ν•™μŠ΅ λ‚΄μš©μ„ κΈ°λ‘ν–ˆμŠ΅λ‹ˆλ‹€.

βœ… Verification:

  • pnpm test --recursive 및 typecheck, lint λͺ…λ Ήμ–΄λ₯Ό 톡해 κΈ°μ‘΄ ν…ŒμŠ€νŠΈμ— λΆ€μž‘μš©μ΄ μ—†μŒμ„ ν™•μΈν–ˆμŠ΅λ‹ˆλ‹€.

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

- bcrypt ν•΄μ‹± μ•Œκ³ λ¦¬μ¦˜μ˜ CPU κ³ κ°ˆμ„ μ΄μš©ν•œ DoS 곡격(Denial of Service)을 λ°©μ§€ν•˜κΈ° μœ„ν•΄ μ‚¬μš©μžμ™€ κ΄€λ¦¬μžμ˜ λΉ„λ°€λ²ˆν˜Έ μ΅œλŒ€ 길이λ₯Ό 1024자둜 μ œν•œν–ˆμŠ΅λ‹ˆλ‹€.
- 영ν–₯λ°›λŠ” μŠ€ν‚€λ§ˆ: AdminLoginSchema, ResetPasswordSchema, LoginRequestSchema, RegisterRequestSchema
@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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant