Skip to content

← Public intelligence

crates.io package

yara-x

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

1 actionable advisory, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 4.8crates.ioAmendedPublished

    yara-x: Unvalidated deserialization in safe Rules::deserialize allows memory corruption and UB

    GHSA-2jx3-ff3v-j7jj

    Affected
    • crates.io yara-x <= 1.18.0
    Fixed in
    1.19.0· Vendor fix available
    Issue
    [!NOTE] This finding was identified during an agentic unsafe Rust code review performed by Gemini AI, followed by human review and verification. The Issue The crate exports a public safe API Rules::deserialize accepting any generic byte sequence B: AsRef<[u8]. It restores compiled rule structures directly from raw bytes using bincode::serde::decodefromslice. This decoded Rules struct contains internal lookup tables, including subpatterns: Vec<(PatternId, SubPattern), atoms: Vec<SubPatternAtom, and litpool: BStringPool. Subsequent safe operations assume these internal tables satisfy strict structural invariants: - Rules::getsubpattern executes unsafe { self.subpatterns.getunchecked(subpatternid.0 as usize) }. If untrusted serialized bytes contain an atom referencing an out-of-bounds SubPatternId, calling getsubpattern during scanning triggers an out-of-bounds memory read (Undefined Behavior).…

    Recommended action: Upgrade to 1.19.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →