CVE-2024-56527: Tecnickcom/tcpdf TCPDF Missing Character Escape On Vulnerability

MODERATE
Advisory Identifier: GHSA-qx95-cwh6-9mvq
CWE-79
Published
Advisory Summary

CVE-2024-56527 is a MODERATE tcpdf missing character escape on vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Tecnickcom/tcpdf libraries in the Packagist ecosystem. The issue involves tcpdf missing character escape on error messages. Remediation is available by upgrading affected packages to version 6.8.0.

CVE-2024-56527 at a Glance

CVE Identifier CVE-2024-56527
GHSA Identifier GHSA-qx95-cwh6-9mvq
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Tecnickcom/tcpdf
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2024-56527

To remediate this vulnerability, upgrade all affected Tecnickcom/tcpdf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

tecnickcom/tcpdf fixed: 6.8.0
Upgrade tecnickcom/tcpdf to 6.8.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for tecnickcom/tcpdf

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-56527, inspect your project dependencies for Tecnickcom/tcpdf:

inspect dependencies for tecnickcom/tcpdf

Analyze the terminal output to locate any version of Tecnickcom/tcpdf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.8.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Tecnickcom/tcpdf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

An issue was discovered in TCPDF before 6.8.0. The Error function lacks an htmlspecialchars call for the error message.

CVE-2024-56527 Affected Tecnickcom/tcpdf Versions

1 component(s)
Fixed Versions:
6.8.0
Product / Package Ecosystem Affected Versions Fixed Version
tecnickcom/tcpdf
Packagist
< 6.8.0
6.8.0

References

Frequently Asked Questions

What is CVE-2024-56527?
CVE-2024-56527 is a security vulnerability in Tecnickcom/tcpdf involving TCPDF missing character escape on error messages under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Tecnickcom/tcpdf versions are affected?
Affected versions include releases prior to 6.8.0 across affected packages: tecnickcom/tcpdf.
What version fixes CVE-2024-56527?
Upgrading to 6.8.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tecnickcom/tcpdf affected?
Yes, tecnickcom/tcpdf is affected in releases prior to 6.8.0. Upgrade your dependency to 6.8.0 or later.
What CWE is associated with CVE-2024-56527?
CVE-2024-56527 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2024-56527?
Run the dependency tree command: 'inspect dependencies for tecnickcom/tcpdf'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qx95-cwh6-9mvq",
  "modified" : "2025-11-04T16:16:33Z",
  "published" : "2024-12-27T06:30:48Z",
  "aliases" : [ "CVE-2024-56527" ],
  "summary" : "TCPDF missing character escape on error messages",
  "details" : "An issue was discovered in TCPDF before 6.8.0. The Error function lacks an htmlspecialchars call for the error message.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "tecnickcom/tcpdf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.8.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-56527"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tecnickcom/TCPDF/commit/11778aaa2d9e30a9ae1c1ee97ff349344f0ad6e1"
  }, {
    "type" : "WEB",
    "url" : "https://andrea0.medium.com/analysis-of-cve-2024-56527-dbdab6962add"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tecnickcom/TCPDF"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tecnickcom/TCPDF/compare/6.7.8...6.8.0"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/06/msg00004.html"
  }, {
    "type" : "WEB",
    "url" : "https://tcpdf.org"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-27T21:07:38Z",
    "nvd_published_at" : "2024-12-27T06:15:23Z"
  }
}