---
id: "CVE-2026-58936"
kind: "vulnerability"
aliases: ["CVE-2026-58936"]
title: "libpng: use-after-free in png_set_tRNS allows remote code execution"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["c", "image-processing", "libpng", "package"]
not_affected_if: ["no-untrusted-png-input"]
published_at: "2026-11-02T20:17:50+00:00"
first_seen_at: "2026-11-02T20:35:32+00:00"
updated_at: "2026-11-02T20:38:45+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-58936", "first_seen_at": "2026-11-02T20:35:32+00:00"}]
---

# libpng: use-after-free in png_set_tRNS allows remote code execution

libpng's png_set_tRNS function in pngset.c has a use-after-free that corrupts memory. According to the description, an attacker can reach remote code execution with no extra privileges and no user interaction.

_Summary, check and fix written by a model from the sources; labelled as such._

## Timeline

- 2026-11-02T20:35:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-58936

## From the sources

In png_set_tRNS of pngset.c, there is a possible memory corruption due to a use-after-free. This could lead to remote code execution with no additional execution privileges needed. User interaction is not needed for exploitation.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
