CVE-2025-46333 Details
Description
z2d is a pure Zig 2D graphics library. Versions of z2d after `0.5.1` and up to and including `0.6.0`, when writing from one surface to another using `z2d.compositor.StrideCompositor.run`, and higher-level operations when the anti-aliasing mode is set to `.default` (such as `Context.fill`, `Context.stroke`, `painter.fill`, and `painter.stroke`), the source surface can be completely out-of-bounds on the x-axis, but not on the y-axis, by way of a negative offset. This results in an overflow of the value controlling the length of the stride. In non-safe optimization modes (consumers compiling with `ReleaseFast` or `ReleaseSmall`), this could potentially lead to invalid memory accesses or corruption. This issue is patched in version `0.6.1`. Users on an untagged version after `v0.5.1` and before `v0.6.1` are advised to update to address the vulnerability. Those still on Zig `0.13.0` are recommended to downgrade to `v0.5.1`.
A vulnerability exists in the z2d graphics library for Zig, specifically in versions after 0.5.1 and up to 0.6.0. The issue arises when writing from one surface to another using the StrideCompositor, particularly with higher-level operations like Context.fill, Context.stroke, painter.fill, and painter.stroke', when the anti-aliasing mode is set to 'default'. The vulnerability allows the source surface to extend completely out-of-bounds on the x-axis, but not the y-axis, through a negative offset. This creates an overflow in the value that determines the length of the stride, potentially leading to invalid memory access or corruption, especially in non-safe optimization modes such as 'ReleaseFast' or 'ReleaseSmall'.
Users are advised to update to version 0.6.1. Those on an untagged version after 0.5.1 and before 0.6.1 should also update, and users still on Zig 0.13.0 are recommended to downgrade to 0.5.1.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Apr 25, 2025CISA-ADP
Assessed Apr 25, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/vancluever/z2d/issues/104 | [email protected] | ExploitIssue TrackingTechnical DescriptionVendor |
| https://github.com/vancluever/z2d/issues/105 | [email protected] | Issue TrackingVendor |
| https://github.com/vancluever/z2d/security/advisories/GHSA-mm4c-p35v-7hx3 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer | [email protected] |
| CWE-122 | Heap-based Buffer Overflow | [email protected] |
| CWE-190 | Integer Overflow or Wraparound | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| vancluever z2d | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 28, 2025 | CVE Modified | [email protected] |
| Apr 25, 2025 | New CVE Received | [email protected] |
Volerion