NULL pointer dereference in Time Project
CVE-2020-26235
In Rust time crate from version 0.2.7 and before version 0.2.23, unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires the user to set any environment variable in a different thread than the affected functions. The affected functions are time::UtcOffset::local_offset_at, time::UtcOffset::try_local_offset_at, time::UtcOffset::current_local_offset, time::UtcOffset::try_current_local_offset, time::OffsetDateTime::now_local and time::OffsetDateTime::try_now_local. Non-Unix targets are unaffected. This includes Windows and wasm. The issue was introduced in version 0.2.7 and fixed in version 0.2.23.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 5.3 (Medium). Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H.
EPSS exploit prediction
EPSS 0.021, 81.9th percentile (last changed ); unchanged over 30 days. About EPSS.
Affected products
- Time Project
- Time-Rs Time — versions >= 0.2.7, <0.2.23
Weakness classification (CWE)
Public exploits and proof-of-concept code
1 public repository with exploit or proof-of-concept code for this CVE:
- federiconbaez/cortex9-time-crate-env-race-interleaving-model (last pushed 2026-11-06): Finite interleaving model of time 0.2.22 tzset/getenv vs setenv realloc (CVE-2020-26235). No threads, libc or real environment.
Also mentioned in 4 other repositories (Artisan-Lab/Rust-memory-safety-bugs, Aureylz/securecodebox-scanner-rust, Aureylzz/securecodebox-scanner-rust, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- github.com/time-rs/time/security/advisories/GHSA-wcg3-cvx6-7396 (Patch, Third Party Advisory)
- github.com/time-rs/time/issues/293 (Third Party Advisory, Issue Tracking)
- crates.io/crates/time/0.2.23 (Release Notes, Vendor Advisory)
This CVE has public exploit evidence. See the latest CVEs with public exploits.