CVE-2021-45847
NixOS vulnerability analysis and mitigation

Overview

Several missing input validations in the 3MF parser component of Slic3r libslic3r 1.3.0 can each allow an attacker to cause an application crash using a crafted 3MF input file. The vulnerability was assigned identifier CVE-2021-45847 and was disclosed on January 25, 2022 (NVD).

Technical details

The vulnerability stems from NULL pointer dereferences in the 3MF XML parser when processing malformed input files. The issue occurs because the get_attribute() function in TMF.cpp returns NULL if a sought attribute is missing, and the NULL checks implemented are ineffective as they don't properly terminate parsing. This leads to crashes when functions like atof() and atoi() receive NULL pointer inputs (GitHub Issue 5118, GitHub Issue 5119). The vulnerability has a CVSS v3.1 Base Score of 5.5 (Medium) with vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H (NVD).

Impact

The vulnerability results in a Denial of Service condition when processing specially crafted 3MF files. When exploited, it causes the application to crash due to NULL pointer dereferences, affecting the availability of the service (GitHub Issue 5118, GitHub Issue 5119, GitHub Issue 5120).

Mitigation and workarounds

The proposed mitigation involves throwing an exception in TMFParserContext::stop() to ensure that file parsing stops immediately when invalid input is detected. Additionally, proper NULL checks should be implemented before constructing strings from attribute values (GitHub Issue 5118, GitHub Issue 5120).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management