7.3high
z2d OOB composition could lead to invalid memory access and corruption
- Severity
- 7.3high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.18% (higher than 8% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
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`.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| vancluever z2d | > 0.5.1, <= 0.6.0 | CVE List |
Classification
What each source says
CVE List
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`.
NVD (es)
z2d es una librería de gráficos Zig 2D pura. En la versión 0.6.0, al escribir de una superficie a otra usando `z2d.compositor.StrideCompositor.run`, la superficie de origen puede estar completamente fuera de los límites en el eje x (pero no en el eje y) debido a un desplazamiento negativo. Esto provoca un desbordamiento del valor que controla la longitud de la zancada. En modos de optimización no seguros (consumidores que compilan con `ReleaseFast` o `ReleaseSmall`), esto podría provocar accesos no válidos a memoria o corrupción. Este problema se solucionó en la versión 0.6.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-46333 changed 2025-04-28 | CVE Terms of Use |
| NVD | CVE-2025-46333 changed 2026-06-17 | Public domain |