CVE-2022-23535

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.
Configurations

Configuration 1 (hide)

cpe:2.3:a:litedb:litedb:*:*:*:*:*:.net:*:*

History

21 Nov 2024, 06:48

Type Values Removed Values Added
CVSS v2 : unknown
v3 : 9.8
v2 : unknown
v3 : 7.3
References () https://github.com/mbdavid/LiteDB/commit/4382ff4dd0dd8b8b16a4e37dfd29727c5f70f93f - Patch () https://github.com/mbdavid/LiteDB/commit/4382ff4dd0dd8b8b16a4e37dfd29727c5f70f93f - Patch
References () https://github.com/mbdavid/LiteDB/security/advisories/GHSA-3x49-g6rc-c284 - Mitigation, Patch, Vendor Advisory () https://github.com/mbdavid/LiteDB/security/advisories/GHSA-3x49-g6rc-c284 - Mitigation, Patch, Vendor Advisory
Summary
  • (es) LiteDB es una base de datos integrada .NET NoSQL pequeña, rápida y liviana. Las versiones anteriores a la 5.0.13 están sujetas a la deserialización de datos que no son de confianza. LiteDB utiliza un campo especial en documentos JSON para convertir diferentes tipos, desde `BsonDocument` a clases POCO. Cuando las instancias de un objeto no son las mismas que las de una clase, `BsonMapper` usa un campo especial `_type` con información de cadena con el nombre completo de la clase con el ensamblaje que se cargará y se ajustará a su modelo. Si su usuario final puede enviar a su aplicación una cadena JSON simple, la deserialización puede cargar un objeto inseguro para que quepa en su modelo. Este problema se solucionó en la versión 5.0.13 con algunas correcciones básicas para evitarlo, pero no está 100% garantizado cuando se usa el tipo "Objeto". La próxima versión principal contendrá una lista de permitidos para seleccionar qué tipo de ensamblaje se puede cargar. Los workarounds se detallan en el aviso para proveedores.

07 Nov 2023, 03:44

Type Values Removed Values Added
Summary 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 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.

Information

Published : 2023-02-24 23:15

Updated : 2024-11-21 06:48


NVD link : CVE-2022-23535

Mitre link : CVE-2022-23535

CVE.ORG link : CVE-2022-23535


JSON object : View

Products Affected

litedb

  • litedb
CWE
CWE-502

Deserialization of Untrusted Data