Cabecera Penligente

CVE-2026-96889: librsvg Use-After-Free and Linux Patch Validation

CVE-2026-96889 is a use-after-free in librsvg when an SVG document contains nested XML inclusions with duplicate entity declarations. The public record describes denial of service and potential arbitrary code execution. Red Hat rates the issue Important with CVSS 3.1 7.8, including local attack vector and required user interaction. Those metrics do not mean the file must be opened manually in a desktop application: an automated thumbnailer, document converter, upload pipeline, messaging preview, or image service may provide the interaction on behalf of a user or workload. See RustSec advisory.

Defenders should inventory consumers, not only packages. Finding librsvg2 on a host establishes component presence. It does not reveal whether untrusted SVG content reaches the parser. Conversely, a containerized conversion service can be exposed even when the host package inventory looks clean.

How the memory-safety condition arises

SVG is XML-based and can include other XML resources. According to the CVE description, nested XInclude processing with duplicate entity declarations can cause librsvg to free an XML entity while the parser still uses it. Later access through the stale reference creates a use-after-free.

The observable result depends on the build, allocator, process, and content path. It may be a clean parse failure, an application crash, corrupted state, or a more serious memory-corruption outcome. The official record says arbitrary code execution is possible, but that statement should not be converted into a claim that every malformed SVG reliably executes code.

Upstream and distribution version decisions

The RustSec advisory lists corrected releases for several branches: 2.63.2 or later; 2.62.4 through versions below 2.62.90; 2.61.5 through versions below 2.61.90; 2.60.3 through versions below 2.61.0; and 2.57.5 through versions below 2.57.90. Linux distributions frequently backport security fixes to older-looking package versions, so upstream comparison is appropriate for self-built or upstream packages but not sufficient for every RPM or DEB. See RustSec advisory.

Medio ambienteHow to decideExample fixed evidence
Upstream/source buildCompare against the upstream advisory and commit historyUse the RustSec patched range for the deployed branch; 2.63.2 or later for 2.63.x
RHEL 10.2Use Red Hat errata and RPM releaselibrsvg2 2.57.1-9.el10_2.10 or later applicable build
RHEL 9Use the exact supported streamlibrsvg2 2.50.7-3.el9_8.1 for the listed stream
RHEL 8Use the exact supported streamlibrsvg2 2.42.7-6.el8_10 for the listed stream
Container or applianceUse the supplier advisory, SBOM, and rebuilt image digestSupplier-confirmed backport or corrected component

Referencias: RustSec advisory y el Red Hat-authored CVE record.

The examples above are not a universal RHEL table. Extended Update Support, SAP, TUS, ELS, and other streams carry separate package revisions. Copying a fixed version from one stream into another can produce a false result. Preserve the product, release, repository, architecture, and package release together.

Find the applications that process SVG

Common consumer categories include desktop file managers and thumbnail services, image viewers, GNOME applications, document and presentation converters, web upload processors, print and publishing systems, PDF generators, email or chat previews, and server-side image transformation. The presence of an SVG extension filter is not enough; determine which library processes the content after validation.

# Package observations on systems you administer
rpm -q librsvg2
dpkg-query -W 'librsvg*'

# Upstream command-line tool when installed
rsvg-convert --version

# Search owned deployment definitions and SBOM exports
rg -n -i 'librsvg|rsvg-convert|image/svg\+xml' .

For a running service, connect the package or shared library to the deployed process, container digest, and ingestion route. A library in a base image may be unused. A statically bundled copy may not appear in the operating-system package database.

Decision flow for finding librsvg consumers, checking upstream or distribution fixes, restarting processes, and retaining evidence.

Explore Penligent for authorized security testing and evidence review.

Practical exposure matrix

Content sourceConsumerPrioridad
Anonymous uploadAutomatic server-side conversion or previewCritical patch priority
External email, chat, or file shareAutomatic desktop thumbnail or previewAlta
Authenticated customer uploadMulti-tenant processing serviceAlta
Curated internal assetsBuild-time conversionModerate, still patch
No identified consumerPackage present onlyUpdate and document negative reachability evidence

Referencias: RustSec advisory y el Red Hat-authored CVE record.

Temporary controls

Until a corrected package or image is deployed, disable unneeded SVG preview and conversion, route untrusted images through a constrained service, limit file size and processing time, and isolate the renderer from secrets, writable application directories, and broad network access. Extension and MIME checks do not repair the parser and can be bypassed by inconsistent content handling, so they are screening controls rather than a complete fix.

Patch verification without a malicious SVG

  1. Record the current package, repository, image digest, and consumer process.
  2. Install the distribution or supplier correction.
  3. Restart long-running consumers or replace containers so the corrected library is loaded.
  4. Confirm the active process or image maps to the approved fixed package.
  5. Render a corpus of legitimate SVG files, including normal XInclude use if the application supports it.
  6. Verify error handling, resource limits, output fidelity, and service health.

Do not circulate a weaponized duplicate-entity file through user desktops or production upload systems. Version and runtime evidence prove the correction more reliably and avoid creating an unmanaged exploit artifact.

Detection and response

Investigate crashes or memory faults in processes that load librsvg, repeated failures tied to the same SVG, thumbnailer restart loops, unusual renderer child processes, and unexpected network or file activity from image-processing services. These signals are not unique to CVE-2026-96889. Preserve the source file according to malware-handling policy, the process crash data, package state, logs, and the content-delivery path.

Conclusión

CVE-2026-96889 is best managed as an image-ingestion boundary, not just a package alert. Identify where untrusted SVG reaches librsvg, apply the upstream or distribution-specific correction, restart the real consumers, and retain package plus runtime evidence. That workflow catches exposed conversion services and desktop automation while avoiding false conclusions from upstream-only version comparisons.

Comparte el post:
Entradas relacionadas
es_ESSpanish