Deserialization in Litedb
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.
Vulnerability class: Insecure Deserialization
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.3 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L.
EPSS exploit prediction
EPSS: 0.007 (51.4th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 51st percentile — 51.4% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.007 · newest: 0.007 · change: 0.000
Affected products
- Litedb
- Mbdavid Litedb — versions < 5.0.13
Weakness classification (CWE)
References
- github.com/mbdavid/LiteDB/security/advisories/GHSA-3x49-g6rc-c284 (Patch, Mitigation, Vendor Advisory)
- github.com/mbdavid/LiteDB/commit/4382ff4dd0dd8b8b16a4e37dfd29727c5f70f93f (Patch)
Frequently asked questions
- What is CVE-2022-23535?
- CVE-2022-23535 is a high-severity vulnerability in Litedb, classified under Deserialization of Untrusted Data. CVSS score: 7.3/10. Published 2023-02-24.
- How severe is CVE-2022-23535?
- High severity. CVSS v3 base score is 7.3 out of 10.