{"id":"CVE-2020-26235","aliases":["ALPINE-CVE-2020-26235","EUVD-2021-1914","GHSA-wcg3-cvx6-7396","RUSTSEC-2020-0071","UBUNTU-CVE-2020-26235","openSUSE-SU-2024:12746-1"],"status":"published","title":"Segmentation fault in Rust time crate","description":"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.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.02085,"percentile":0.81819,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-476"],"published":"2020-11-18T12:00:00Z","modified":"2026-11-03T06:32:37Z","exploits":[{"source":"pocgithub","id":"federiconbaez/cortex9-time-crate-env-race-interleaving-model","title":"federiconbaez/cortex9-time-crate-env-race-interleaving-model","date":"2026-11-06","url":"https://github.com/federiconbaez/cortex9-time-crate-env-race-interleaving-model"}],"fixes":[{"ecosystem":"crates.io","package":"time","fixed_in":["0.2.23","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6"],"sources":["ghsa","osv"]},{"ecosystem":"Alpine:v3.17","package":"newsboat","fixed_in":["2.30.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.18","package":"newsboat","fixed_in":["2.30.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"newsboat","fixed_in":["2.30.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"newsboat","fixed_in":["2.30.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"newsboat","fixed_in":["2.30.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"newsboat","fixed_in":["2.30.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.23","package":"newsboat","fixed_in":["2.30.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"newsboat","fixed_in":["2.30.1-r0"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"time","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.2.7"},{"fixed":"0.2.23"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"time","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.1.0"},{"fixed":"0.2.0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.17","package":"newsboat","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.30.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.18","package":"newsboat","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.30.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"newsboat","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.30.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"newsboat","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.30.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"newsboat","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.30.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"newsboat","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.30.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.23","package":"newsboat","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.30.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"newsboat","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.30.1-r0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"time","ranges":[{"type":"SEMVER","events":[{"introduced":"0.1.0"},{"fixed":"0.2.23"}]}]},{"source":"osv","ecosystem":"crates.io","package":"time","ranges":[{"type":"SEMVER","events":[{"introduced":"0.2.7"},{"fixed":"0.2.23"}]}]},{"source":"osv","ecosystem":"crates.io","package":"time","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.2.0"},{"introduced":"0.2.1-0"},{"fixed":"0.2.1"},{"introduced":"0.2.2-0"},{"fixed":"0.2.2"},{"introduced":"0.2.3-0"},{"fixed":"0.2.3"},{"introduced":"0.2.4-0"},{"fixed":"0.2.4"},{"introduced":"0.2.5-0"},{"fixed":"0.2.5"},{"introduced":"0.2.6-0"},{"fixed":"0.2.6"},{"introduced":"0.2.7-0"},{"fixed":"0.2.23"}]}]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"rust-time","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.1.42-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"rust-time","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.1.42-1","0.3.5-2","0.3.5-3"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"rust-time","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.3.23-2","0.3.31-1","0.3.31-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"rust-time","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.3.37-1","0.3.39-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"rust-time","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.3.47-1","0.3.54-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"rust-time","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.3.39-1","0.3.44-1","0.3.47-1"]}],"products":[{"vendor":"time-rs","product":"time"},{"vendor":"time_project","product":"time"}],"references":[{"url":"https://github.com/time-rs/time/security/advisories/GHSA-wcg3-cvx6-7396","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://github.com/time-rs/time/issues/293","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://crates.io/crates/time/0.2.23","tags":["x_refsource_MISC","x_transferred","Release Notes","Vendor Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26235","tags":["advisory"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0071.html","tags":["web","advisory","report"]},{"url":"https://github.com/advisories/GHSA-wcg3-cvx6-7396"},{"url":"https://security.alpinelinux.org/vuln/CVE-2020-26235","tags":["advisory"]},{"url":"https://github.com/time-rs/time","tags":["package"]},{"url":"https://crates.io/crates/time","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2020-26235","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-26235","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2020-26235","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2020-26235","title":"Segmentation fault in Rust time crate","description":"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.","status":"published","published":"2020-11-24T21:20:14Z","modified":"2024-08-04T15:56:03.095Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"cna"}],"cwes":["CWE-476"],"updated_at":"2026-11-02T14:35:46.129376Z"}],"euvd":[{"id":"EUVD-2021-1914","description":"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.","status":"published","published":"2020-11-24T21:20:14Z","modified":"2024-08-04T15:56:03Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-03T03:07:15.778249Z"}],"ghsa":[{"id":"GHSA-wcg3-cvx6-7396","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).","status":"published","published":"2021-08-25T20:56:46Z","modified":"2024-06-10T18:40:13Z","cvss":[{"version":"3.1","score":6.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-476"],"updated_at":"2026-11-02T14:37:54.624184Z"}],"nvd":[{"id":"CVE-2020-26235","description":"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.","status":"published","published":"2020-11-24T22:15:11.657Z","modified":"2026-06-17T03:07:53.16Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"},{"version":"2.0","score":3.5,"vector":"AV:N/AC:M/Au:S/C:N/I:N/A:P","level":"low","assessor":"primary"}],"cwes":["CWE-476"],"updated_at":"2026-11-02T14:06:25.394006Z"}],"osv":[{"id":"ALPINE-CVE-2020-26235","description":"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.","status":"published","published":"2020-11-24T22:15:11.657Z","modified":"2026-11-03T06:32:37.006153948Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-03T07:17:20.312441Z"},{"id":"CVE-2020-26235","description":"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.","status":"published","published":"2020-11-24T22:15:11.657Z","modified":"2026-10-20T10:52:56.956184671Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:44:15.879068Z"},{"id":"GHSA-wcg3-cvx6-7396","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).","status":"published","published":"2021-08-25T20:56:46Z","modified":"2026-09-10T03:49:08.359875406Z","cvss":[{"version":"3.1","score":6.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-476"],"updated_at":"2026-11-02T15:46:58.401149Z"},{"id":"RUSTSEC-2020-0071","title":"Potential segfault in the time crate","description":"### Impact\n\nThe affected functions set environment variables without synchronization. On Unix-like operating systems, this can crash in multithreaded programs. Programs may segfault due to dereferencing a dangling pointer if an environment variable is read in a different thread than the affected functions. This may occur without the user's knowledge, notably in the Rust standard library or third-party libraries.\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- `time::at_utc`\n- `time::at`\n- `time::now`\n- `time::tzset`\n\nNon-Unix targets (including Windows and wasm) are unaffected.\n\n### Patches\n\nPending a proper fix, 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.\n\nUsers and library authors with time in their dependency tree should perform `cargo update`, which will pull in the updated, unaffected code.\n\nUsers of time 0.1 do not have a patch and should upgrade to an unaffected version: time 0.2.23 or greater or the 0.3 series.\n\n### Workarounds\n\nA possible workaround for crates affected through the transitive dependency in `chrono`, is to avoid using the default `oldtime` feature dependency of the `chrono` crate by disabling its `default-features` and manually specifying the required features instead.\n\n#### Examples:\n\n`Cargo.toml`:  \n\n```toml\nchrono = { version = \"0.4\", default-features = false, features = [\"serde\"] }\n```\n\n```toml\nchrono = { version = \"0.4.22\", default-features = false, features = [\"clock\"] }\n```\n\nCommandline:  \n\n```bash\ncargo add chrono --no-default-features -F clock\n```\n\nSources:  \n - [chronotope/chrono#602 (comment)](https://github.com/chronotope/chrono/issues/602#issuecomment-1242149249)  \n - [vityafx/serde-aux#21](https://github.com/vityafx/serde-aux/issues/21)","status":"published","published":"2020-11-18T12:00:00Z","modified":"2026-02-04T02:31:56.682937Z","cvss":[{"version":"3.1","score":6.2,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:53:39.492624Z"},{"id":"UBUNTU-CVE-2020-26235","description":"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.","status":"published","published":"2020-11-24T22:15:00Z","modified":"2026-10-17T12:56:13.090208995Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:54:23.905183Z"},{"id":"openSUSE-SU-2024:12746-1","title":"newsboat-2.30.1-1.1 on GA media","description":"These are all security issues fixed in the newsboat-2.30.1-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T03:15:08.991687Z","updated_at":"2026-11-02T16:58:35.751245Z"}]}}
