Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-49260: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in pontedilana php-weasyprint

0
High
VulnerabilityCVE-2026-49260cvecve-2026-49260cwe-78
Published: Fri Jun 19 2026 (06/19/2026, 16:59:01 UTC)
Source: CVE Database V5
Vendor/Project: pontedilana
Product: php-weasyprint

Description

PhpWeasyPrint, a PHP library for PDF generation, contains an OS command injection vulnerability in versions prior to 2.5.1. The issue arises because the binary path is improperly validated, allowing crafted input to reach a shell command execution function without proper sanitization. This vulnerability has a high severity with a CVSS score of 8.2. Version 2.5.1 includes a patch that fixes this problem.

CVSS v3.1

Score 8.2high

Attack Vector
Local
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Affected software

Packagistmore threats →ai
pontedilana/php-weasyprint
pkg:composer/pontedilana/php-weasyprint
Affected versions
<2.5.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/19/2026, 17:20:24 UTC

Technical Analysis

PhpWeasyPrint versions before 2.5.1 improperly neutralize special elements in the OS command used to invoke the WeasyPrint binary. The library attempts to validate the binary path by quoting it with escapeshellarg() and then checking its executability with is_executable(), but this check fails because the quotes become part of the filename. Consequently, the validation is bypassed, and the raw binary path string, which may come from configuration or environment variables, is passed directly to Symfony's Process::fromShellCommandline(), enabling OS command injection. The vulnerability is fixed in version 2.5.1.

Potential Impact

Successful exploitation allows an attacker with high privileges (local access with high privileges) to execute arbitrary OS commands with the privileges of the php-weasyprint process. This can lead to complete system compromise, including confidentiality, integrity, and availability impacts. The vulnerability requires local access and high privileges but does not require user interaction.

Mitigation Recommendations

A fix is available in php-weasyprint version 2.5.1. Users should upgrade to version 2.5.1 or later to remediate this vulnerability. Until upgraded, avoid sourcing the binary path from untrusted configuration or environment variables to reduce risk.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-05-28T14:33:01.179Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a3576cef198dc38c1c38eaf

Added to database: 6/19/2026, 5:05:18 PM

Last enriched: 6/19/2026, 5:20:24 PM

Last updated: 6/19/2026, 6:15:18 PM

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses