security(ui): harden rendered filenames against BiDi controls - #776
seonghobae wants to merge 12 commits into
Conversation
|
👋 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. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Scope correction
이 PR에서 확인되는 실제 경계는 정적 directory listing에 표시되는 공격자 제어 파일명/디렉토리명의 시각적 순서 왜곡입니다. html4tree에는 파일 업로드·실행 기능이 없으므로 generated body의 “악성 파일 업로드/실행” 영향은 repository evidence로 입증되지 않습니다.
Unicode 18.0 UAX #9(2026-09-01)는
Bidi_Control에 ALM/LRM/RLM, embedding·override controls, isolate controls를 포함합니다. WHATWG HTML은 방향을 알 수 없는 외부 텍스트를 주변 문맥과 격리할 때bdi를 사용하도록 정의합니다.Primary references:
Current causal repair
master@728f0f33323e43573d6664209891099502827d5ddaba942d536029f598bb2599e717457751548ab5fea5a94db3cd3ccbf8a23baa8d143b648223823e1e7c1af8bd48da4b5872dca451b8a3613450de3cescapeHtml()now neutralizes the complete 12-character UnicodeBidi_Controlset as visible\uXXXXtext whileurlEncodePath()continues to encode the original filename bytes forhref. Generated file labels use<bdi dir="auto">rather than attacker-controlled directional formatting characters. Tooltip/title text receives the neutralized filename. The existing trusted FSI/PDI wrappers around the directory heading/title remain unchanged in this lineage; attacker-provided controls inside the directory name are neutralized before that boundary.The focused regression covers ALM, LRM, RLM, LRE, RLE, PDF, LRO, RLO, LRI, RLI, FSI and PDI, natural Arabic/Korean text, encoded href preservation, tooltip text, and filename markup isolation.
Generated
.jules/sentinel.mddoctrine remains outside this effective repair; no force push, destructive rebase, self-approval or gate weakening was used.Remaining acceptance before Ready
Current hosted status is nonterminal, so this PR remains Draft and no merge/release claim is made.
Material UI Delivery Gate
Bidi_Control계약과 focused regression은 갖췄으나 browser acceptance 미완료