🇰🇷 한글 설명
.NET 프레임워크용 ORM인 NHibernate의 ILiteralType.ObjectToSQLString 구현체에서 SQL 인젝션 취약점이 발견되었습니다. 상속 매핑, HQL 쿼리, SqlInsertBuilder/SqlUpdateBuilder 사용 시 특정 조건에서 공격자가 악의적인 SQL을 실행할 수 있습니다.
💡 쉬운 설명
데이터베이스를 다루는 프로그램 도구에서 사용자의 입력값이 검증 없이 명령어로 전달될 수 있는 보안 약점이 발견되었습니다. 이를 통해 해커가 데이터베이스의 정보를 몰래 빼가거나 조작할 위험이 있습니다.
🇺🇸 원문 (English)
NHibernate is an object-relational mapper for the .NET framework. A SQL injection vulnerability exists in some types implementing ILiteralType.ObjectToSQLString. Callers of these methods are exposed to the vulnerability, which includes mappings using inheritance with discriminator values; HQL queries referencing a static field of the application; users of the SqlInsertBuilder and SqlUpdateBuilder utilities, calling their AddColumn overload taking a literal value; and any direct use of the ObjectToSQLString methods for building SQL queries on the user side. This vulnerability is fixed in 5.4.9 and 5.5.2.
📍 영향받는 시스템
NHibernate 5.4.9 미만 및 5.5.2 미만 버전
⚔️ 공격 벡터
ILiteralType.ObjectToSQLString을 사용하는 특정 메서드 호출 시 조작된 입력값을 전달하여 SQL 인젝션 수행
🛡️ 대응 방법
NHibernate를 5.4.9 또는 5.5.2 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 NHibernate의 버전이 5.4.9 또는 5.5.2보다 낮은지 확인
dotnet list package | grep NHibernate