Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] ꡬ쑰 검증 μ‹œ μ˜ˆμ™Έ 처리 λˆ„λ½μœΌλ‘œ μΈν•œ DoS 취약점 ν•΄κ²° - #762

Open
seonghobae wants to merge 1 commit into
developfrom
fix-pdfreader-dos-17391223737705272512
Open

πŸ›‘οΈ Sentinel: [CRITICAL] ꡬ쑰 검증 μ‹œ μ˜ˆμ™Έ 처리 λˆ„λ½μœΌλ‘œ μΈν•œ DoS 취약점 ν•΄κ²°#762
seonghobae wants to merge 1 commit into
developfrom
fix-pdfreader-dos-17391223737705272512

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: 파일 νŒŒμ‹± μ—”λ“œν¬μΈνŠΈμ—μ„œ ꡬ쑰 검증을 μœ„ν•œ PdfReader 호좜 μ‹œ νŠΉμ • μ˜ˆμ™Έλ§Œ μ²˜λ¦¬ν•˜μ—¬ κ·Έ μ™Έ μ˜ˆμƒμΉ˜ λͺ»ν•œ μ˜ˆμ™Έ(예: MemoryError, TypeError) λ°œμƒ μ‹œ 500 μ—λŸ¬λ‘œ μΈν•œ DoS μƒνƒœ 유발 κ°€λŠ₯성이 μ‘΄μž¬ν–ˆμŠ΅λ‹ˆλ‹€.
🎯 Impact: μ•…μ˜μ μΈ μ‚¬μš©μžκ°€ 비정상적인 νŒŒμΌμ„ 반볡 μ—…λ‘œλ“œν•˜μ—¬ μ„œλΉ„μŠ€ κ°€μš©μ„±μ„ ν•΄μΉ˜κ³  μ„œλ²„ ν¬λž˜μ‹œλ₯Ό μœ λ°œν•  수 μžˆμŠ΅λ‹ˆλ‹€.
πŸ”§ Fix: ꡬ쑰 검증 μ‹œ except Exception:으둜 λͺ¨λ“  μ˜ˆμ™Έλ₯Ό μ•ˆμ „ν•˜κ²Œ μž‘μ•„λ‚΄κ³ , μ˜ˆμ™Έ λ‚΄μš©μ„ λ‘œκΉ…ν•œ λ’€ ν΄λΌμ΄μ–ΈνŠΈμ—λŠ” 415 μƒνƒœ μ½”λ“œλ₯Ό λ°˜ν™˜ν•˜λ„λ‘ κ°œμ„ ν–ˆμŠ΅λ‹ˆλ‹€.
βœ… Verification: TypeErrorλ₯Ό λ°œμƒμ‹œν‚€λŠ” λ‹¨μœ„ ν…ŒμŠ€νŠΈλ₯Ό μΆ”κ°€ν•˜μ—¬ 415 응닡과 μ˜¬λ°”λ₯Έ λ‘œκ·Έκ°€ λ‚¨λŠ”μ§€ ν™•μΈν–ˆμŠ΅λ‹ˆλ‹€.


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


Devin Review

파일 νŒŒμ‹± μ—”λ“œν¬μΈνŠΈμ—μ„œ ꡬ쑰 검증을 μœ„ν•œ `PdfReader` 호좜 μ‹œ νŠΉμ • μ˜ˆμ™Έλ§Œ μ²˜λ¦¬ν•˜μ—¬ κ·Έ μ™Έ μ˜ˆμƒμΉ˜ λͺ»ν•œ μ˜ˆμ™Έ(예: `MemoryError`, `TypeError`) λ°œμƒ μ‹œ 500 μ—λŸ¬λ‘œ μΈν•œ DoS μƒνƒœ 유발 κ°€λŠ₯성이 μ‘΄μž¬ν–ˆμŠ΅λ‹ˆλ‹€.

ꡬ쑰 검증 μ‹œ `except Exception:`으둜 λͺ¨λ“  μ˜ˆμ™Έλ₯Ό μ•ˆμ „ν•˜κ²Œ μž‘μ•„λ‚΄κ³ , μ˜ˆμ™Έ λ‚΄μš©μ„ λ‘œκΉ…ν•œ λ’€ ν΄λΌμ΄μ–ΈνŠΈμ—λŠ” 415 μƒνƒœ μ½”λ“œλ₯Ό λ°˜ν™˜ν•˜λ„λ‘ κ°œμ„ ν–ˆμŠ΅λ‹ˆλ‹€.
λ‹¨μœ„ ν…ŒμŠ€νŠΈλ₯Ό μΆ”κ°€ν•˜μ—¬ 415 응닡과 μ˜¬λ°”λ₯Έ λ‘œκ·Έκ°€ λ‚¨λŠ”μ§€ ν™•μΈν–ˆμŠ΅λ‹ˆλ‹€.
@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.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 16 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

βš™οΈ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4927db0a-7c12-4b9f-9a88-e531f1219b34

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between e06b1f3 and f00362f.

πŸ“’ Files selected for processing (3)
  • .jules/sentinel.md
  • src/newsdom_api/main.py
  • tests/test_parse_endpoint.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread src/newsdom_api/main.py
if len(reader.pages) < 1:
raise ValueError("PDF has no pages")
except (PdfReadError, RecursionError, ValueError, OverflowError):
except Exception as exc:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŸ₯ Memory exhaustion bypasses validation handler

A crafted PDF that makes PdfReader raise MemoryError bypasses except Exception. The request can still crash a worker instead of returning 415.

Devin Review

Was this helpful? React with πŸ‘ or πŸ‘Ž to provide feedback.

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