๐ก๏ธ Sentinel: [HIGH] Fix Null Byte Injection in File Validation#120
๐ก๏ธ Sentinel: [HIGH] Fix Null Byte Injection in File Validation#120seonghobae wants to merge 3 commits into
Conversation
`DefaultDocumentValidationService`์์ ํ์ผ๋ช ๊ฒ์ฆ ์ Null Byte(`\u0000`)๋ฅผ ์ด์ฉํ ํ์ฅ์ ์ฐํ ๋ฐ ์ ์ญ ๊ณต๊ฒฉ์ ๋ฐฉ์งํ๊ธฐ ์ํด ํ์ผ๋ช ์ Null Byte๊ฐ ํฌํจ๋ ๊ฒฝ์ฐ ์ฆ์ `IllegalArgumentException`์ ๋ฐ์์์ผ ์ ๋ ฅ์ ๊ฑฐ๋ถํ๋๋ก ๋ก์ง์ ์ถ๊ฐํ์ต๋๋ค. - ๊ด๋ จ ๋จ์ ํ ์คํธ `rejectsFilenameWithNullByte` ์ถ๊ฐ (100% ํ ์คํธ ์ปค๋ฒ๋ฆฌ์ง ์ ์ง) - `.jules/sentinel.md`์ ๋ณด์ ๊ด๋ จ ํ์ต ๋ด์ฉ ๊ธฐ๋ก
|
๐ 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. |
|
#120 current-head failure follow-up I re-read the failing current-head logs/SARIF and pushed Observed failures:
Changes pushed:
Verification:
Next loop item: re-check the current-head GitHub checks/SARIF once Actions starts this new SHA, and cancel old-head queued runs where the API permits it so the queue only works on current heads. |
- `org.bouncycastle:bcprov-jdk18on`์ ๋ฒ์ `1.81`์์ ๋ฐ๊ฒฌ๋ OSV ๋ฐ Trivy ์ค์บ ์ทจ์ฝ์ (CVE-2025-14813, CVE-2026-0636)์ ํด๊ฒฐํ๊ธฐ ์ํด Bouncycastle ๋ฒ์ ์ `1.84`๋ก ๋ช ์์ ์ผ๋ก ์ ๋ฐ์ดํธํ์ต๋๋ค. - `<dependencyManagement>` ์น์ ์ ์ถ๊ฐํ์ฌ ๊ด๋ จ Bouncycastle ์ํฐํฉํธ(`bcprov`, `bcpkix`, `bcutil`, `bcjmail`) ๋ฒ์ ์ด ์ผ๊ด๋๊ฒ 1.84๋ก ์ ์ฉ๋๋๋ก ๋ณด์ฅํฉ๋๋ค. - `pdfbox.version`์ 3.0.3์์ 3.0.4๋ก ์ ๋ฐ์ดํธํ์ฌ ์ถ๊ฐ์ ์ธ ์ทจ์ฝ์ ์ ์๋ฐฉํฉ๋๋ค. - ์์กด์ฑ ๋ฒ์ ์ ๋ฐ์ดํธ์ด๋ฏ๋ก ๊ธฐ์กด ์์ค ์ฝ๋ ๋ฐ ํ ์คํธ์ ๋ณ๊ฒฝ์ ์์ต๋๋ค.
๐ก๏ธ Sentinel: [HIGH] Fix Null Byte Injection in File Validation
๐จ Severity: HIGH
๐ก Vulnerability:
DefaultDocumentValidationService์์ ์ ๋ก๋๋ ํ์ผ์ ์๋ณธ ํ์ผ๋ช ์ Null Byte(\u0000)๊ฐ ํฌํจ๋์ด ์๋์ง ๊ฒ์ฆํ์ง ์์์ต๋๋ค.๐ฏ Impact: ๊ณต๊ฒฉ์๊ฐ ํ์ผ๋ช ์ Null Byte๋ฅผ ์ฃผ์ ํ์ฌ ํ์ฅ์ ๊ฒ์ฆ์ ์ฐํํ๊ณ (์:
malicious.hwp\u0000.pdf), ํ์ ์์คํ ์์ ํ์ผ๋ช ์ด ์ ์ญ๋๋๋ก ๋ง๋ค์ด ์ ์ฑ ํ์ผ์ ์ ๋ก๋ํ ์ ์๋ ์ํ์ด ์์ต๋๋ค.๐ง Fix: ์๋ณธ ํ์ผ๋ช ์ ํ๋ํ ์งํ
fileName.indexOf('\u0000') >= 0๊ฒ์ฌ๋ฅผ ์ํํ์ฌ Null Byte๊ฐ ๋ฐ๊ฒฌ๋๋ฉด ์ฆ์IllegalArgumentException์ ๋์ ธ(fail securely) ํด๋น ์ ๋ ฅ์ ๋ช ์์ ์ผ๋ก ๊ฑฐ๋ถํ๋๋ก ์์ ํ์ต๋๋ค.โ Verification:
rejectsFilenameWithNullByte์์ฑ ๋ฐ ํต๊ณผ ํ์ธmvn test๋ช ๋ น์ด๋ก ๊ธฐ์กด ํ ์คํธ ํฌํจ ๋ชจ๋ ํ ์คํธ 100% ํต๊ณผ ํ์ธ (Failures: 0)mvn -DskipTests checkstyle:check๋ช ๋ น์ด๋ก ์ถ๊ฐ๋ ์ฝ๋๊ฐ strict Checkstyle ๋ฃฐ์ ์ค์ํจ์ ํ์ธ.jules/sentinel.md์ ๋ณด์ ๊ตํ(Learning) ๊ธฐ๋ก ์๋ฃPR created automatically by Jules for task 10962904880897055436 started by @seonghobae