{"id":"CVE-2020-36458","aliases":["EUVD-2021-1696","GHSA-f997-8gxg-r354","RUSTSEC-2020-0138"],"status":"published","title":"Data races in lexer","description":"An issue was discovered in the lexer crate through 2020-11-10 for Rust. For ReaderResult\u003cT, E\u003e, there is an implementation of Sync with a trait bound of T: Send, E: Send.","severity":{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.00833,"percentile":0.5806,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-362","CWE-77"],"published":"2020-11-10T12:00:00Z","modified":"2026-06-17T03:15:32Z","affected":[{"source":"ghsa","ecosystem":"crates.io","package":"lexer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.1.16"}]}]},{"source":"osv","ecosystem":"crates.io","package":"lexer","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.1.16"}]}]},{"source":"osv","ecosystem":"crates.io","package":"lexer","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}]}],"products":[{"vendor":"lexer_project","product":"lexer"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0138.html","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Patch","Third Party Advisory","web","advisory"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/lexer/RUSTSEC-2020-0138.md","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-36458","tags":["advisory"]},{"url":"https://gitlab.com/nathanfaucett/rs-lexer/-/issues/2","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-f997-8gxg-r354"},{"url":"https://gitlab.com/nathanfaucett/rs-lexer","tags":["package"]},{"url":"https://crates.io/crates/lexer","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2020-36458","description":"An issue was discovered in the lexer crate through 2020-11-10 for Rust. For ReaderResult\u003cT, E\u003e, there is an implementation of Sync with a trait bound of T: Send, E: Send.","status":"published","published":"2021-08-08T05:14:09Z","modified":"2024-08-04T17:30:07.395Z","updated_at":"2026-11-02T14:35:55.128961Z"}],"euvd":[{"id":"EUVD-2021-1696","description":"An issue was discovered in the lexer crate through 2020-11-10 for Rust. For ReaderResult\u003cT, E\u003e, there is an implementation of Sync with a trait bound of T: Send, E: Send.","status":"published","published":"2021-08-08T05:14:09Z","modified":"2024-08-04T17:30:07Z","updated_at":"2026-11-03T03:07:03.010139Z"}],"ghsa":[{"id":"GHSA-f997-8gxg-r354","title":"Data races in lexer","description":"lexer is a plugin based lexical reader.Affected versions of this crate implements Sync for ReaderResult\u003cT, E\u003e with the trait bound T: Send, E: Send. Since matching on the public enum ReaderResult\u003cT, E\u003e provides access to \u0026T \u0026 \u0026E, allowing data race to a non-Sync type T or E. This can result in a memory corruption when multiple threads concurrently access \u0026T or \u0026E. Suggested fix for the bug is change the trait bounds imposed on T \u0026 E to be T: Sync, E: Sync.","status":"published","published":"2021-08-25T20:58:09Z","modified":"2023-02-01T05:06:03Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-77","CWE-362"],"updated_at":"2026-11-02T14:36:36.66596Z"}],"nvd":[{"id":"CVE-2020-36458","description":"An issue was discovered in the lexer crate through 2020-11-10 for Rust. For ReaderResult\u003cT, E\u003e, there is an implementation of Sync with a trait bound of T: Send, E: Send.","status":"published","published":"2021-08-08T06:15:07.837Z","modified":"2026-06-17T03:15:32.103Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-362"],"updated_at":"2026-11-02T14:06:44.292752Z"}],"osv":[{"id":"GHSA-f997-8gxg-r354","title":"Data races in lexer","description":"lexer is a plugin based lexical reader.Affected versions of this crate implements Sync for ReaderResult\u003cT, E\u003e with the trait bound T: Send, E: Send. Since matching on the public enum ReaderResult\u003cT, E\u003e provides access to \u0026T \u0026 \u0026E, allowing data race to a non-Sync type T or E. This can result in a memory corruption when multiple threads concurrently access \u0026T or \u0026E. Suggested fix for the bug is change the trait bounds imposed on T \u0026 E to be T: Sync, E: Sync.","status":"published","published":"2021-08-25T20:58:09Z","modified":"2023-11-08T04:03:46.074313Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-362","CWE-77"],"updated_at":"2026-11-02T15:46:46.006631Z"},{"id":"RUSTSEC-2020-0138","title":"ReaderResult should be bounded by Sync","description":"Affected versions of this crate implements `Sync` for `ReaderResult\u003cT, E\u003e` with the trait bound `T: Send, E: Send`.\n\nSince matching on the public enum `ReaderResult\u003cT, E\u003e` provides access to `\u0026T` \u0026 `\u0026E`,\nallowing data race to a non-Sync type `T` or `E`.\nThis can result in a memory corruption when multiple threads concurrently access `\u0026T` or `\u0026E`.\n\nSuggested fix for the bug is change the trait bounds imposed on `T` \u0026 `E` to be `T: Sync, E: Sync`.","status":"published","published":"2020-11-10T12:00:00Z","modified":"2023-11-08T04:03:46.074313Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:53:39.492624Z"}]}}
