Email me

Rust advisories / image

Vulnerability CriticalRUSTSEC-2019-0014 · image

RUSTSEC-2019-0014: Flaw in interface may drop uninitialized instance of arbitrary types

Short answerA security vulnerability in the image crate: Flaw in interface may drop uninitialized instance of arbitrary types. Critical severity (CVSS 9.8). Fixed in 0.21.3: update to a fixed version.

Crateimage
TypeVulnerability
Affected versionsFrom 0.10.2 before 0.21.3.
Fixed in0.21.3
SeverityCritical, CVSS 9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published2019-08-21
Last changed2023-11-08
Also known asCVE-2019-16138, GHSA-m2pf-hprp-3vqm
Affected functionsimage::hdr::HDRDecoder::read_image_transform

What to do

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

Affected versions of this crate would call Vec::set_len on an uninitialized vector with user-provided type parameter, in an interface of the HDR image format decoder. They would then also call other code that could panic before initializing all instances.

This could run Drop implementations on uninitialized types, equivalent to use-after-free, and allow an attacker arbitrary code execution.

Two different fixes were applied. It is possible to conserve the interface by ensuring proper initialization before calling Vec::set_len. Drop is no longer called in case of panic, though.

Starting from version 0.22, a breaking change to the interface requires callers to pre-allocate the output buffer and pass a mutable slice instead, avoiding all unsafe code.

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 image

Full security history of image

Up next

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