π‘οΈ Sentinel: [CRITICAL] νμΌ μ λ‘λ κ²½λ‘ μ‘°μ(Path Traversal) μ·¨μ½μ μμ #114
π‘οΈ Sentinel: [CRITICAL] νμΌ μ
λ‘λ κ²½λ‘ μ‘°μ(Path Traversal) μ·¨μ½μ μμ #114seonghobae wants to merge 5 commits into
Conversation
MultipartFile.getOriginalFilename()μ μ λ’°νμ¬ λ°μν μ μλ κ²½λ‘ μ‘°μ μ·¨μ½μ μ μμ νμ΅λλ€. StringUtils.cleanPath()λ₯Ό μ¬μ©νμ¬ κ²½λ‘λ₯Ό μ κ·ννκ³ μμν νμΌλͺ λ§ μΆμΆνμ¬ μ μμ μΈ νμ΄λ‘λ(μ: ../../../etc/passwd.hwp)λ‘λΆν° μμ€ν μ 보νΈν©λλ€.
|
π 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 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 Review Overview
Changed-File Evidence Mapflowchart 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"]
|
MultipartFile.getOriginalFilename()μ μ λ’°νμ¬ λ°μν μ μλ κ²½λ‘ μ‘°μ μ·¨μ½μ μ μμ νμ΅λλ€. StringUtils.cleanPath()λ₯Ό μ¬μ©νμ¬ κ²½λ‘λ₯Ό μ κ·ννκ³ μμν νμΌλͺ λ§ μΆμΆνμ¬ μ μμ μΈ νμ΄λ‘λ(μ: ../../../etc/passwd.hwp)λ‘λΆν° μμ€ν μ 보νΈν©λλ€.
π¨ 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