Email me

Rust advisories / generator

Vulnerability MediumRUSTSEC-2020-0151 · generator

RUSTSEC-2020-0151: Generators can cause data races if non-Send types are used in their generator functions

Short answerA security vulnerability in the generator crate: Generators can cause data races if non-Send types are used in their generator functions. Medium severity (CVSS 5.9). Fixed in 0.7.0: update to a fixed version.

Crategenerator
TypeVulnerability (memory-corruption)
Affected versionsBefore 0.7.0.
Fixed in0.7.0
SeverityMedium, CVSS 5.9
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Published2020-11-16
Last changed2023-11-08
Also known asCVE-2020-36471, GHSA-w3g5-2848-2v8r

What to do

  1. See which version you have: cargo tree -i generator (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p generator. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example generator = "0.7.0") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

The Generator type is an iterable which uses a generator function that yields values. In affected versions of the crate, the provided function yielding values had no Send bounds despite the Generator itself implementing Send.

The generator function lacking a Send bound means that types that are dangerous to send across threads such as Rc could be sent as part of a generator, potentially leading to data races.

This flaw was fixed in commit f7d120a3b by enforcing that the generator function be bound by Send.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Other advisories for generator

Full security history of generator

Up next

Same crategenerator: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ