LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files. In versions 1.2.1 through 1.6.55, png_set_tRNS and png_set_PLTE each alias a heap-allocated buffer between png_struct and png_info, sharing a single allocation across two structs with independent lifetimes. The trans_alpha aliasing has been present since at least libpng 1.0, and the palette aliasing since at least 1.2.1. Both affect all prior release lines png_set_tRNS sets png_ptr->trans_alpha = info_ptr->trans_alpha (256-byte buffer) and png_set_PLTE sets info_ptr->palette = png_ptr->palette (768-byte buffer). In both cases, calling png_free_data (with PNG_FREE_TRNS or PNG_FREE_PLTE) frees the buffer through info_ptr while the corresponding png_ptr pointer remains dangling. Subsequent row-transform functions dereference and, in some code paths, write to the freed memory. A second call to png_set_tRNS or png_set_PLTE has the same effect, because both functions call png_free_data internally before reallocating the info_ptr buffer. Version 1.6.56 fixes the issue.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-416"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33416.json"
}[
{
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/d5515b5b8be3901aac04e5bd8bd5c89f287bcd33",
"target": {
"file": "pngtest.c"
},
"id": "CVE-2026-33416-053d8287",
"digest": {
"line_hashes": [
"277710390577621166110153611286032748480",
"37812626001429359030407727102204306192",
"235108146190051955392336492964133331294",
"308819439959077714989618121299124277555",
"260397287775790088579463485285595959002"
],
"threshold": 0.9
},
"deprecated": false
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/7ea9eea884a2328cc7fdcb3c0c00246a50d90667",
"target": {
"file": "pngrtran.c",
"function": "png_set_quantize"
},
"id": "CVE-2026-33416-194a5630",
"digest": {
"function_hash": "110572468687495742200864067113934234520",
"length": 6241.0
},
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/23019269764e35ed8458e517f1897bd3c54820eb",
"target": {
"file": "pngwrite.c"
},
"id": "CVE-2026-33416-2d180195",
"digest": {
"line_hashes": [
"78664929825541045347943804030659098153",
"275886753624758850400559950953109869061",
"278154899009160441335130137202641445200"
],
"threshold": 0.9
},
"deprecated": false
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/23019269764e35ed8458e517f1897bd3c54820eb",
"target": {
"file": "pngwrite.c",
"function": "png_write_destroy"
},
"id": "CVE-2026-33416-3f5e0ea0",
"digest": {
"function_hash": "236483884268181938566890713142960837813",
"length": 656.0
},
"deprecated": false
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/23019269764e35ed8458e517f1897bd3c54820eb",
"target": {
"file": "pngset.c",
"function": "png_set_tRNS"
},
"id": "CVE-2026-33416-44e93205",
"digest": {
"function_hash": "173692133047662245734139657595136211741",
"length": 1171.0
},
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/7ea9eea884a2328cc7fdcb3c0c00246a50d90667",
"target": {
"file": "pngrtran.c"
},
"id": "CVE-2026-33416-467fa3b8",
"digest": {
"line_hashes": [
"295188705198664353711129016364915234481",
"61186881870620331963563260190091368059",
"85813034465098086945703998494715198010",
"36639532824671943475506617781821801755"
],
"threshold": 0.9
},
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/23019269764e35ed8458e517f1897bd3c54820eb",
"target": {
"file": "pngset.c"
},
"id": "CVE-2026-33416-4f17f3a6",
"digest": {
"line_hashes": [
"98250150014725793241419848892413636482",
"178195276882115633313296615493177798347",
"25821686872119194689388687505844949308",
"227026791080689077429011535169474272442",
"330282194084099661137173723318868244171",
"107706244600529939118018940606878508341",
"178700209567818827418407780831917929359",
"287471555282919382848424250461084643241",
"209745718595423869275787055612001785623",
"2193192155644361006466675754143514414",
"141909920218320054918118988767399339265",
"26768757656783073233094152591480478634",
"40812701347163550374053105626947511165"
],
"threshold": 0.9
},
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/d5515b5b8be3901aac04e5bd8bd5c89f287bcd33",
"target": {
"file": "png.c"
},
"id": "CVE-2026-33416-9a8d3ae7",
"digest": {
"line_hashes": [
"195793623419483107751349550499422338653",
"241481619897360395005270248340996576576",
"333957916052778635910280086895133772621",
"73182602440664933896353205027083131409",
"119279519610455638020139458056230155289",
"215279933436747534013670962459111392399"
],
"threshold": 0.9
},
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/23019269764e35ed8458e517f1897bd3c54820eb",
"target": {
"file": "pngread.c"
},
"id": "CVE-2026-33416-a202cb2c",
"digest": {
"line_hashes": [
"132271531588699432055803361145099610809",
"65959435425179038609954885545663919930",
"309074223655768629569164703220595436025",
"322267439836006670487936700399879236401",
"12150830541721880045790454698624805187",
"317024228464654619763612828428494868402",
"191979943930225737051145180056805495095",
"169730874509956863687399430614975043623",
"211794578928073518449791588814755226723"
],
"threshold": 0.9
},
"deprecated": false
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/23019269764e35ed8458e517f1897bd3c54820eb",
"target": {
"file": "pngread.c",
"function": "png_read_destroy"
},
"id": "CVE-2026-33416-bf3d1d12",
"digest": {
"function_hash": "6181938991129466879817268636515152608",
"length": 1692.0
},
"deprecated": false
},
{
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/d5515b5b8be3901aac04e5bd8bd5c89f287bcd33",
"target": {
"file": "png.h"
},
"id": "CVE-2026-33416-dc375153",
"digest": {
"line_hashes": [
"166375070723291529406421301066248769034",
"275647010778297936193963675511576832388",
"256826767335212246520616614652191899280",
"279336807821086835335477021495116274772",
"53629475448747437379627006107537775352",
"46568612355367798241902050586166833318",
"245452045998668159989023841863587304868",
"114709392716353867339954008479701831121"
],
"threshold": 0.9
},
"deprecated": false
},
{
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/pnggroup/libpng/commit/d5515b5b8be3901aac04e5bd8bd5c89f287bcd33",
"target": {
"file": "png.c",
"function": "png_get_copyright"
},
"id": "CVE-2026-33416-ed236551",
"digest": {
"function_hash": "241740084829777515414352894687164664979",
"length": 481.0
},
"deprecated": false
}
]
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-33416.json"
"2026-06-18T19:53:40Z"