🇰🇷 한글 설명
Scriban 7.0.0 미만 버전의 string.pad_left 및 string.pad_right 함수에서 제어되지 않는 메모리 할당 취약점이 발견되었습니다. 공격자가 매우 큰 너비 값을 입력할 경우 대규모 메모리 할당을 유도하여 OutOfMemoryException을 발생시키고 서비스 거부(DoS) 상태를 유발할 수 있습니다.
💡 쉬운 설명
템플릿 도구의 특정 기능을 악용해 컴퓨터의 메모리를 한꺼번에 엄청나게 많이 사용하게 만드는 공격입니다. 이로 인해 프로그램이 메모리 부족으로 멈추거나 꺼질 수 있습니다.
🇺🇸 원문 (English)
Scriban before 7.0.0 (affected versions <= 6.6.0) contains an uncontrolled memory allocation vulnerability in the string.pad_left and string.pad_right template functions, which perform no validation on the width parameter before delegating to .NET's String.PadLeft/PadRight. When an application exposes Scriban to untrusted template input, an attacker can supply an arbitrarily large width value (e.g., 500,000,000) to trigger ~1GB memory allocations in a single call, resulting in OutOfMemoryException and denial of service. The TemplateContext.LimitToString limit does not prevent this because it is only enforced after the string has been fully allocated.
📍 영향받는 시스템
Scriban versions <= 6.6.0
⚔️ 공격 벡터
신뢰할 수 없는 템플릿 입력을 통해 string.pad_left/right 함수에 매우 큰 너비 값을 전달
🛡️ 대응 방법
Scriban을 7.0.0 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 Scriban의 버전이 7.0.0 미만인지 확인하십시오.
dotnet list package | grep Scriban