CVE-2021-28306
Description
An issue was discovered in the fltk crate before 0.15.3 for Rust. There is a NULL pointer dereference during attempted use of a multi label type if the image is nonexistent.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A NULL pointer dereference in the fltk crate for Rust before 0.15.3 can be triggered by using a multi label type when the associated image is nonexistent.
The vulnerability resides in the Rust fltk crate, which provides bindings for the FLTK GUI library. The bug is a NULL pointer dereference that occurs when a widget's label type is set to LabelType::Multi and the widget has no associated image (i.e., the image is nonexistent). This lack of a proper null check leads to undefined behavior when the library attempts to use the null pointer as if it pointed to a valid image structure.
An attacker can exploit this issue by crafting a GUI application that uses the vulnerable LabelType::Multi on a widget without providing an image. The attack does not require special network access; it can be triggered locally by the application's code itself. Note that the vulnerability is specific to the fltk crate versions before 0.15.2 (for the affected function WidgetExt::set_label_type) and earlier versions as detailed in the advisory [1][3].
If successfully exploited, an attacker can cause a denial-of-service condition through a segmentation fault or potentially achieve memory corruption, leading to arbitrary code execution in the context of the application. The issue was discovered and reported through the RustSec advisory database [3] and the project's issue tracker [4].
Mitigation is available by upgrading the fltk crate to version 0.15.3 or later, which includes the fix. No workaround is necessary for users who update their dependencies accordingly [3].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
fltkcrates.io | < 0.15.3 | 0.15.3 |
Affected products
2- fltk/fltkdescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- github.com/advisories/GHSA-5pg8-h4gv-m3p8ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-28306ghsaADVISORY
- github.com/MoAlyousef/fltk-rs/issues/519ghsaWEB
- rustsec.org/advisories/RUSTSEC-2021-0038.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.