Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] 파일 μ—…λ‘œλ“œ 경둜 μ‘°μž‘(Path Traversal) 취약점 μˆ˜μ •#114

Open
seonghobae wants to merge 5 commits into
mainfrom
sentinel-fix-path-traversal-10152229827960603039
Open

πŸ›‘οΈ Sentinel: [CRITICAL] 파일 μ—…λ‘œλ“œ 경둜 μ‘°μž‘(Path Traversal) 취약점 μˆ˜μ •#114
seonghobae wants to merge 5 commits into
mainfrom
sentinel-fix-path-traversal-10152229827960603039

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: 파일 μ—…λ‘œλ“œ μ‹œ MultipartFile.getOriginalFilename() 값을 검증 없이 μ‚¬μš©ν•˜μ—¬ λ°œμƒν•  수 μžˆλŠ” 경둜 μ‘°μž‘(Path Traversal) 취약점 발견.
🎯 Impact: κ³΅κ²©μžκ°€ 디렉토리 탐색 λ¬Έμžμ—΄(../)을 ν¬ν•¨ν•œ 파일λͺ…을 μ „μ†‘ν•˜μ—¬ μ˜λ„ν•˜μ§€ μ•Šμ€ κ²½λ‘œμ— νŒŒμΌμ„ μ €μž₯ν•˜κ±°λ‚˜ μ‹œμŠ€ν…œ 파일(예: /etc/passwd)에 μ ‘κ·Ό/μ‘°μž‘ν•  μœ„ν—˜μ΄ 있음.
πŸ”§ Fix: DefaultDocumentConversionService 및 DefaultDocumentValidationServiceμ—μ„œ 파일λͺ…을 μ‚¬μš©ν•˜κΈ° μ „ StringUtils.cleanPath()λ₯Ό 톡해 경둜λ₯Ό μ •κ·œν™”ν•˜κ³ , λ§ˆμ§€λ§‰ / μ΄ν›„μ˜ μˆœμˆ˜ν•œ 파일λͺ…λ§Œ μΆ”μΆœν•˜λ„λ‘ sanitizeFilename λ©”μ†Œλ“œλ₯Ό μΆ”κ°€ν•˜μ—¬ μ•ˆμ „ν•˜κ²Œ μ²˜λ¦¬ν•¨.
βœ… Verification: λ‹¨μœ„ ν…ŒμŠ€νŠΈ(submitStripsDirectoryTraversalFromOriginalFilename 및 stripsDirectoryTraversalFromFilename)λ₯Ό μΆ”κ°€ν•˜μ—¬ 취약점 λ¬Έμžμ—΄μ΄ μ •μƒμ μœΌλ‘œ μ œκ±°λ˜λŠ”μ§€ 검증 μ™„λ£Œ. (100% ν…ŒμŠ€νŠΈ 컀버리지 μœ μ§€)


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

MultipartFile.getOriginalFilename()을 μ‹ λ’°ν•˜μ—¬ λ°œμƒν•  수 μžˆλŠ” 경둜 μ‘°μž‘ 취약점을 μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€.
StringUtils.cleanPath()λ₯Ό μ‚¬μš©ν•˜μ—¬ 경둜λ₯Ό μ •κ·œν™”ν•˜κ³  μˆœμˆ˜ν•œ 파일λͺ…λ§Œ μΆ”μΆœν•˜μ—¬ μ•…μ˜μ μΈ νŽ˜μ΄λ‘œλ“œ(예: ../../../etc/passwd.hwp)λ‘œλΆ€ν„° μ‹œμŠ€ν…œμ„ λ³΄ν˜Έν•©λ‹ˆλ‹€.
@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.

MultipartFile.getOriginalFilename()을 μ‹ λ’°ν•˜μ—¬ λ°œμƒν•  수 μžˆλŠ” 경둜 μ‘°μž‘ 취약점을 μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€.
StringUtils.cleanPath()λ₯Ό μ‚¬μš©ν•˜μ—¬ 경둜λ₯Ό μ •κ·œν™”ν•˜κ³  μˆœμˆ˜ν•œ 파일λͺ…λ§Œ μΆ”μΆœν•˜μ—¬ μ•…μ˜μ μΈ νŽ˜μ΄λ‘œλ“œ(예: ../../../etc/passwd.hwp)λ‘œλΆ€ν„° μ‹œμŠ€ν…œμ„ λ³΄ν˜Έν•©λ‹ˆλ‹€.
MultipartFile.getOriginalFilename()을 μ‹ λ’°ν•˜μ—¬ λ°œμƒν•  수 μžˆλŠ” 경둜 μ‘°μž‘ 취약점을 μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€.
StringUtils.cleanPath()λ₯Ό μ‚¬μš©ν•˜μ—¬ 경둜λ₯Ό μ •κ·œν™”ν•˜κ³  μˆœμˆ˜ν•œ 파일λͺ…λ§Œ μΆ”μΆœν•˜μ—¬ μ•…μ˜μ μΈ νŽ˜μ΄λ‘œλ“œ(예: ../../../etc/passwd.hwp)λ‘œλΆ€ν„° μ‹œμŠ€ν…œμ„ λ³΄ν˜Έν•©λ‹ˆλ‹€.
MultipartFile.getOriginalFilename()을 μ‹ λ’°ν•˜μ—¬ λ°œμƒν•  수 μžˆλŠ” 경둜 μ‘°μž‘ 취약점을 μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€.
StringUtils.cleanPath()λ₯Ό μ‚¬μš©ν•˜μ—¬ 경둜λ₯Ό μ •κ·œν™”ν•˜κ³  μˆœμˆ˜ν•œ 파일λͺ…λ§Œ μΆ”μΆœν•˜μ—¬ μ•…μ˜μ μΈ νŽ˜μ΄λ‘œλ“œ(예: ../../../etc/passwd.hwp)λ‘œλΆ€ν„° μ‹œμŠ€ν…œμ„ λ³΄ν˜Έν•©λ‹ˆλ‹€.
@opencode-agent

opencode-agent Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 73c20c545c098b5484bcc9e213ef187e677aed7f
  • Workflow run: 28911498625
  • Workflow attempt: 1
  • Gate result: APPROVE (exit 0)

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (8 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (8 files)"]
  R1 --> V1["required checks"]
Loading

@seonghobae seonghobae enabled auto-merge (squash) July 9, 2026 01:22
MultipartFile.getOriginalFilename()을 μ‹ λ’°ν•˜μ—¬ λ°œμƒν•  수 μžˆλŠ” 경둜 μ‘°μž‘ 취약점을 μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€.
StringUtils.cleanPath()λ₯Ό μ‚¬μš©ν•˜μ—¬ 경둜λ₯Ό μ •κ·œν™”ν•˜κ³  μˆœμˆ˜ν•œ 파일λͺ…λ§Œ μΆ”μΆœν•˜μ—¬ μ•…μ˜μ μΈ νŽ˜μ΄λ‘œλ“œ(예: ../../../etc/passwd.hwp)λ‘œλΆ€ν„° μ‹œμŠ€ν…œμ„ λ³΄ν˜Έν•©λ‹ˆλ‹€.
@opencode-agent opencode-agent Bot disabled auto-merge July 11, 2026 11:44
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