🇰🇷 한글 설명
LiteDB 5.0.13 미만 버전에서 신뢰할 수 없는 데이터의 역직렬화 취약점이 발견되었습니다. 공격자가 JSON 문서 내의 `_type` 필드를 조작하여 임의의 클래스를 로드함으로써 악성 객체를 생성할 수 있습니다. 이 문제는 5.0.13 버전에서 일부 수정되었으나, Object 타입을 사용하는 경우 여전히 위험할 수 있습니다.
💡 쉬운 설명
데이터베이스가 데이터를 읽어올 때, 공격자가 보낸 가짜 정보를 바탕으로 원치 않는 프로그램을 실행할 수 있는 보안 구멍이 있습니다. 사용자가 입력한 데이터가 시스템의 중요한 명령으로 변질될 수 있는 위험한 상태입니다.
🇺🇸 원문 (English)
LiteDB is a small, fast and lightweight .NET NoSQL embedded database. Versions prior to 5.0.13 are subject to Deserialization of Untrusted Data. LiteDB uses a special field in JSON documents to cast different types from `BsonDocument` to POCO classes. When instances of an object are not the same of class, `BsonMapper` use a special field `_type` string info with full class name with assembly to be loaded and fit into your model. If your end-user can send to your app a plain JSON string, deserialization can load an unsafe object to fit into your model. This issue is patched in version 5.0.13 with some basic fixes to avoid this, but is not 100% guaranteed when using `Object` type. The next major version will contain an allow-list to select what kind of Assembly can be loaded. Workarounds are detailed in the vendor advisory.
📍 영향받는 시스템
LiteDB versions prior to 5.0.13
⚔️ 공격 벡터
사용자가 입력한 JSON 문자열 내의 `_type` 필드에 악성 클래스 정보를 삽입하여 역직렬화 유도
🛡️ 대응 방법
LiteDB를 5.0.13 이상 버전으로 업데이트하고, 가능한 경우 Object 타입 사용을 지양하며 벤더의 권고 사항을 준수하십시오.
🔧 검증 코드
출력된 LiteDB의 버전이 5.0.13 미만인지 확인하십시오.
dotnet list package | grep LiteDB