CVE-2021-40265

HIGH

A heap overflow bug exists FreeImage before 1.18.0 via ofLoad function in PluginJPEG.cpp.

Affects 1 product across 1 vendor.

CVSS 3.18.8
EPSS0.9%
Percentile58th
PatchUnknown
CVSS Vector — Plain English Remotely exploitable over the network, low complexity, no authentication required, requires user interaction, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
CWE Weakness Definitions
CWE-787: Out-of-Bounds Write

Software writes data past buffer boundaries, corrupting memory and potentially enabling code execution.

◆ AI Analysis — automated analysis, not human-reviewed

A heap overflow vulnerability exists in FreeImage before version 1.18.0, specifically in the ofLoad function within PluginJPEG.cpp. This could allow an attacker to execute arbitrary code or cause a denial of service.

BSID: BS-2023-GLOBAL-307205-H • Model: /workspace/models/qwen2.5-coder-32b-instruct-bf16 • Confidence: HIGH

Is this CVE in your environment?

BreachSpider monitors your ICS/OT environment for vulnerabilities like this one. No agents or network access required. Free to start.

Check My Environment →
Frequently Asked Questions
What is CVE-2021-40265?
A heap overflow vulnerability exists in FreeImage before version 1.18.0, specifically in the ofLoad function within PluginJPEG.cpp. This could allow an attacker to execute arbitrary code or cause a denial of service.
What is the CVSS score for CVE-2021-40265?
CVE-2021-40265 has CVSS 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. EPSS: 0.9%.
Is CVE-2021-40265 actively exploited?
No confirmed active exploitation of CVE-2021-40265 as of 2026-05-30.
How do I remediate CVE-2021-40265?
Priority: IMMEDIATE.
What systems are affected by CVE-2021-40265?
CVE-2021-40265 affects Freeimage Project Freeimage.
Vulnerability Details
CVE IDCVE-2021-40265
BSIDBS-2023-GLOBAL-307205-H BreachSpider Global ID
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Published2023-08-22
Last Modified2024-11-21
ICS Relevance15%
Weakness (CWE)
SourceNVD
Official Description

A heap overflow bug exists FreeImage before 1.18.0 via ofLoad function in PluginJPEG.cpp.

Source: NIST NVD / MITRE CVE Database

Attack Vector Analysis — CITED Relevance

The vulnerability is triggered by a specially crafted JPEG file being loaded using the ofLoad function. An attacker could exploit this by convincing a user to open a malicious JPEG file, potentially leading to remote code execution.

Exploitation Likelihood: HIGH

Affected Products
VendorProductAffected Versions
Freeimage Project Freeimage < 1.18.0
Remediation

No official vendor advisory link on record. See the CVE record →

Threat Intelligence
● Threat Intelligence Validated: October 2026 | Threat Age: 1150 Days
CISA known-exploitedNot in KEV catalog
Public ExploitNot confirmed
PoC CodeNot confirmed
AI Enrichment Record — provenance & audit hash
Model/workspace/models/qwen2.5-coder-32b-instruct-bf16
ConfidenceHIGH
Enriched At2026-05-24
SHA-512 Audit Hash763dd3f367cb80cac8b6a470e4d028453bef744b62c454d2925763080e9f75ea497ed493cd8f3087d6d64827590aaff9ad4a913542b490c9f843894a9c6e59da
Related CVEs affecting Freeimage Project
CVE-2025-70968 9.8 FreeImage 3.18.0 contains a Use After Free in PluginTARGA.cpp;loadRLE(). CVE-2024-31570 9.8 libfreeimage in FreeImage 3.4.0 through 3.18.0 has a stack-based buffer overf... CVE-2021-40263 8.8 A heap overflow vulnerability in FreeImage 1.18.0 via the ofLoad function in ... CVE-2020-24293 8.8 Buffer Overflow vulnerability in psdThumbnail::Read in PSDParser.cpp in FreeI... CVE-2020-24292 8.8 Buffer Overflow vulnerability in load function in PluginICO.cpp in FreeImage ...
View all Freeimage Project CVEs →

ICS/OT Vulnerability Intelligence for Your Environment

BreachSpider tracks 384,000+ CVEs and matches them to your ICS/OT assets by exact version, with AI analysis, NERC CIP mapping, and vendor PSIRT contacts.

Create a free account →