Email me

Rust advisories / rulex

Vulnerability MediumRUSTSEC-2022-0031 · rulex

RUSTSEC-2022-0031: Panic due to improper UTF-8 indexing

Short answerA security vulnerability in the rulex crate: Panic due to improper UTF-8 indexing. GitHub rates it Medium. Fixed in 0.4.3: update to a fixed version.

Craterulex
TypeVulnerability (denial-of-service)
Affected versionsBefore 0.4.3.
Fixed in0.4.3
SeverityMedium (GitHub rating)
Published2022-05-21
Last changed2026-10-12
Also known asCVE-2022-31100, GHSA-8v9w-p43c-r885

What to do

  1. See which version you have: cargo tree -i rulex (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p rulex. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example rulex = "0.4.3") 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

When parsing untrusted rulex expressions, rulex may panic, possibly enabling a Denial of Service attack. This happens when the expression contains a multi- byte UTF-8 code point in a string literal or after a backslash, because rulex tries to slice into the code point and panics as a result.

The flaw was corrected in commits fac6d58b25 and 330b3534e7 by using len_utf8() to derive character width in bytes instead of assuming ASCII encoding of 1 byte per char.

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 rulex

Full security history of rulex

Up next

Same craterulex: 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