{"id":"GHSA-wcg3-cvx6-7396","revision":"ba31541195ae4a469ac19c46ca1f5c40","records":[{"revision":"ba31541195ae4a469ac19c46ca1f5c40","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-wcg3-cvx6-7396","aliases":["CVE-2020-26235","RUSTSEC-2020-0071"],"title":"Segmentation fault in time","description":"### Impact\n\nUnix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.\n\nThe affected functions from time 0.2.7 through 0.2.22 are:\n\n- `time::UtcOffset::local_offset_at`\n- `time::UtcOffset::try_local_offset_at`\n- `time::UtcOffset::current_local_offset`\n- `time::UtcOffset::try_current_local_offset`\n- `time::OffsetDateTime::now_local`\n- `time::OffsetDateTime::try_now_local`\n\nThe affected functions in time 0.1 (all versions) are:\n\n- `at`\n- `at_utc`\n- `now`\n\nNon-Unix targets (including Windows and wasm) are unaffected.\n\n### Patches\n\nIn some versions of `time`, the internal method that determines the local offset has been modified to always return `None` on the affected operating systems. This has the effect of returning an `Err` on the `try_*` methods and `UTC` on the non-`try_*` methods. In later versions, `time` will attempt to determine the number of threads running in the process. If the process is single-threaded, the call will proceed as its safety invariant is upheld.\n\nUsers and library authors with time in their dependency tree must perform `cargo update`, which will pull in the updated, unaffected code.\n\nUsers of time 0.1 do not have a patch and must upgrade to an unaffected version: time 0.2.23 or greater or the 0.3 series.\n\n### Workarounds\n\nLibrary authors must ensure that the program only has one running thread at the time of calling any affected method. Binary authors may do the same and/or ensure that no other thread is actively mutating the environment.\n\n### References\n\n[time-rs/time#293](https://github.com/time-rs/time/issues/293).","state":0,"publishedAt":"2021-08-25T20:56:46+00:00","modifiedAt":"2026-09-10T03:49:08.3598754+00:00","affected":[{"ecosystem":"crates.io","name":"time","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.1.0"},{"kind":"fixed","version":"0.2.23"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"crates.io","name":"time","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.2.7"},{"kind":"fixed","version":"0.2.23"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/time-rs/time/security/advisories/GHSA-wcg3-cvx6-7396","https://nvd.nist.gov/vuln/detail/CVE-2020-26235","https://github.com/time-rs/time/issues/293","https://crates.io/crates/time/0.2.23","https://github.com/time-rs/time","https://rustsec.org/advisories/RUSTSEC-2020-0071.html"],"sourceUrl":"https://github.com/advisories/GHSA-wcg3-cvx6-7396","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-wcg3-cvx6-7396","identifiers":["GHSA-wcg3-cvx6-7396","CVE-2020-26235","RUSTSEC-2020-0071"]},"retained":false,"historicalAffected":[]}],"coverage":[]}