{"uuid": "60dc8c2c-76c5-4ae8-b421-319e8c5d295a", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "9f56dd64-161d-43a6-b9c3-555944290a09", "vulnerability": "CVE-2026-96889", "type": "seen", "source": "https://gist.github.com/alon710/d1f4346440fcedb1efb5807a4a7b9ac1", "content": "# GHSA-WQ5F-XC86-PV6W: CVE-2026-96889: Remote Code Execution via Use-After-Free in librsvg (VectorFreed)\n\n&gt; **CVSS Score:** 7.8\n&gt; **Published:** 2026-10-06\n&gt; **Full Report:** https://cvereports.com/reports/GHSA-WQ5F-XC86-PV6W\n\n## Summary\nVectorFreed identifies a critical Use-After-Free (UAF) memory corruption vulnerability in librsvg (CVE-2026-96889), which manifests when parsing structured SVG documents containing nested XML inclusions (XIncludes) and duplicate entity declarations. The flaw results from an entity ownership conflict where librsvg prematurely deallocates an xmlEntity structure still actively referenced by the underlying libxml2 parser context. When transitively compiled into downstream applications such as the high-performance sharp image processing library, this vulnerability facilitates denial of service and unauthenticated remote code execution on the host operating system.\n\n## TL;DR\nA Use-After-Free vulnerability in librsvg (CVE-2026-96889) allows remote code execution when processing crafted SVG files with nested XML Inclusions (XInclude) and duplicate entity declarations, transitively impacting sharp, Next.js, and Ghost.\n\n## Exploit Status: POC\n\n## Technical Details\n\n- **CWE ID**: CWE-416\n- **Attack Vector**: Local / Network via Transitive Library Calls\n- **CVSS Base Score**: 7.8 (High)\n- **EPSS Score**: 0.00129 (Percentile: 2.15%)\n- **Exploit Status**: Proof-of-Concept Available\n- **CISA KEV Status**: Not Listed\n\n## Affected Systems\n\n- librsvg\n- sharp (npm package)\n- Next.js (ImageResponse Node.js runtime path)\n- Ghost (Bookmark Cards processing)\n- Satori\n- **librsvg**: &lt; 2.63.2 (Fixed in: `2.63.2`)\n- **sharp**: &lt; 0.35.5 (Fixed in: `0.35.5`)\n- **Next.js**: &gt;= 16.2.0, &lt;= 16.3.5 (Fixed in: `16.3.6`)\n- **Ghost**: &gt;= 6.56.0, &lt; 6.67.0 (Fixed in: `6.67.0`)\n\n## Mitigation\n\n- Disable SVG loading operation inside sharp if vector graphics processing is not required.\n- Apply security updates to downstream web frameworks (Next.js, Ghost) that handle server-side image generation.\n- Deploy host-level binary protections including ASLR and PIE to hinder heap exploitation techniques.\n\n**Remediation Steps:**\n1. Identify all instances of the sharp library in package.json files.\n2. Run 'npm install sharp@0.35.5' or update the dependency range to ensure sharp-libvips version 1.3.4 is pulled.\n3. For system-wide installations of librsvg on Linux, update the system packages using 'apt-get install librsvg2-dev' or 'yum update librsvg2'.\n4. Verify the installed version of librsvg is 2.63.2 or one of the backported versions (2.62.4, 2.61.5, 2.60.3).\n\n## References\n\n- [GitHub Advisory: Use-After-Free in sharp bundled dependency](https://github.com/lovell/sharp/security/advisories/GHSA-wq5f-xc86-pv6w)\n- [RustSec Security Advisory: Memory corruption in librsvg](https://rustsec.org/advisories/RUSTSEC-2026-0305.html)\n- [CVE Record: CVE-2026-96889](https://www.cve.org/CVERecord?id=CVE-2026-96889)\n- [Vercel Next.js Downstream Security Advisory](https://github.com/vercel/next.js/security/advisories/GHSA-vcvr-r3jv-pc5j)\n- [Ghost Downstream Security Advisory](https://github.com/TryGhost/Ghost/security/advisories/GHSA-788w-68h3-cvxp)\n- [Satori HTML/XML Escaping Bypass Advisory](https://github.com/vercel/satori/security/advisories/GHSA-wx4j-mvgx-mqwp)\n\n\n---\n*Generated by [CVEReports](https://cvereports.com/reports/GHSA-WQ5F-XC86-PV6W) - Automated Vulnerability Intelligence*", "creation_timestamp": "2026-10-06T15:30:31.000000Z"}