CVE-2022-0496
Description
A vulnerbiility was found in Openscad, where a DXF-format drawing with particular (not necessarily malformed!) properties may cause an out-of-bounds memory access when imported using import().
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
OpenSCAD DXF import with certain drawing properties triggers an out-of-bounds memory access due to improper line index validation.
Vulnerability
The vulnerability resides in the DXF import functionality of OpenSCAD, specifically in src/dxfdata.cc [1][2]. When a DXF file with particular (not necessarily malformed) properties is imported using import(), the code fails to validate line indices retrieved from a grid data structure. This leads to an out-of-bounds memory access on lines 470, 475, 505, or 510 of dxfdata.cc [3]. Affected versions include the Linux build from commit eedf370 and the Windows x64 release 2021.01 [3].
Exploitation
An attacker can exploit this vulnerability by providing a crafted DXF file that, when imported, triggers the out-of-bounds read. The condition occurs when multiple line segments share common points and are merged into contiguous paths via the ADD_LINE macro; this can cause grid data entries to point to an invalid line index [3]. Proof-of-concept files are available that reliably reproduce the crash [3]. No authentication or special privileges are required; the victim need only open the file in OpenSCAD or run it headlessly with openscad --export-format stl [3].
Impact
The out-of-bounds access is a read-only violation; it does not allow arbitrary code execution or data modification [3]. However, such a read can be leveraged to bypass security mechanisms like stack canaries and pointer encryption, potentially aiding further exploitation [3]. The most immediate impact is application crash (segmentation fault), resulting in a denial of service [3].
Mitigation
OpenSCAD released fixes via commits 00a4692989 [1] and 770e3234 [2] on August 29, 2022, which add bounds checks for line indices before use. Users should upgrade to a version containing these commits. If an immediate upgrade is not possible, avoid importing untrusted DXF files. Red Hat notes the issue does not affect commercially supported Red Hat products [4].
AI Insight generated on May 27, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
3- Openscad/Openscaddescription
Patches
0No patches discovered yet.
Vulnerability mechanics
Synthesis attempt was rejected by the grounding validator. Re-run pending.
References
4- bugzilla.redhat.com/show_bug.cgimitrex_refsource_MISC
- github.com/openscad/openscad/commit/00a4692989c4e2f191525f73f24ad8727bacdf41mitrex_refsource_MISC
- github.com/openscad/openscad/commit/770e3234cbfe66edbc0333f796b46d36a74aa652mitrex_refsource_MISC
- github.com/openscad/openscad/issues/4037mitrex_refsource_MISC
News mentions
0No linked articles in our index yet.