CVE-2018-17057: Tecnickcom/tcpdf TCPDF Vulnerable To Attackers Triggering Vulnerability

CRITICAL
Advisory Identifier: GHSA-5hw4-m7f3-hhx8
CVSS 9.8
CWE-502
Published
Advisory Summary

CVE-2018-17057 is a CRITICAL (CVSS 9.8) tcpdf vulnerable to attackers triggering vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Tecnickcom/tcpdf libraries in the Packagist ecosystem. The issue involves tcpdf vulnerable to attackers triggering deserialization of arbitrary data. Remediation is available by upgrading affected packages to version 6.2.22.

CVE-2018-17057 at a Glance

CVE Identifier CVE-2018-17057
GHSA Identifier GHSA-5hw4-m7f3-hhx8
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Tecnickcom/tcpdf
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2018-17057

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.2.22
Upgrade tecnickcom/tcpdf to 6.2.22
fooman/tcpdf fixed: 6.2.22
Upgrade fooman/tcpdf to 6.2.22
la-haute-societe/tcpdf fixed: 6.2.22
Upgrade la-haute-societe/tcpdf to 6.2.22
spoonity/tcpdf fixed: 6.2.22
Upgrade spoonity/tcpdf to 6.2.22
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-2018-17057, 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.2.22), 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. 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.2.22. Attackers can trigger deserialization of arbitrary data via the `phar://` wrapper.

CVE-2018-17057 Affected Tecnickcom/tcpdf Versions

4 component(s)
Fixed Versions:
6.2.22
Product / Package Ecosystem Affected Versions Fixed Version
tecnickcom/tcpdf
Packagist
< 6.2.22
6.2.22
fooman/tcpdf
Packagist
< 6.2.22
6.2.22
la-haute-societe/tcpdf
Packagist
< 6.2.22
6.2.22
spoonity/tcpdf
Packagist
< 6.2.22
6.2.22

References

NVD — CVE-2018-17057 NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-17057
Security Fix Commit FIX COMMIT
https://github.com/LimeSurvey/LimeSurvey/commit/1cdd78d27697b3150bb44aaa7af1a81062a591a5
Security Fix Commit FIX COMMIT
https://github.com/tecnickcom/TCPDF/commit/1861e33fe05f653b67d070f7c106463e7a5c26ed
Tecnickcom/tcpdf Security Information SECURITY
https://contao.org/en/news/security-vulnerability-cve-2018-17057.html
Tecnickcom/tcpdf Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/fooman/tcpdf/CVE-2018-17057.yaml
Tecnickcom/tcpdf Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/la-haute-societe/tcpdf/CVE-2018-17057.yaml
Tecnickcom/tcpdf Source Repository REPOSITORY
https://github.com/tecnickcom/TCPDF
Tecnickcom/tcpdf Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/spoonity/tcpdf/CVE-2018-17057.yaml
Tecnickcom/tcpdf Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/tecnickcom/tcpdf/CVE-2018-17057.yaml
Tecnickcom/tcpdf Source Repository REPOSITORY
https://github.com/FriendsOfPHP/security-advisories/blob/master/wallabag/tcpdf/CVE-2018-17057.yaml
www.exploit-db.com/exploits/46634 WEB
https://www.exploit-db.com/exploits/46634
Tecnickcom/tcpdf Security Information SECURITY
http://packetstormsecurity.com/files/152200/TCPDF-6.2.19-Deserialization-Remote-Code-Execution.html
Tecnickcom/tcpdf Security Information SECURITY
http://packetstormsecurity.com/files/152360/LimeSurvey-Deserialization-Remote-Code-Execution.html
seclists.org/fulldisclosure/2019... WEB
http://seclists.org/fulldisclosure/2019/Mar/36

Frequently Asked Questions

What is CVE-2018-17057?
CVE-2018-17057 is a security vulnerability in Tecnickcom/tcpdf involving TCPDF vulnerable to attackers triggering deserialization of arbitrary data under CWE-502: Deserialization of Untrusted Data.
Which Tecnickcom/tcpdf versions are affected?
Affected versions include releases prior to 6.2.22 across affected packages: tecnickcom/tcpdf, fooman/tcpdf, la-haute-societe/tcpdf, spoonity/tcpdf.
What version fixes CVE-2018-17057?
Upgrading to 6.2.22 (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.2.22. Upgrade your dependency to 6.2.22 or later.
Is fooman/tcpdf affected?
Yes, fooman/tcpdf is affected in releases prior to 6.2.22. Upgrade your dependency to 6.2.22 or later.
What is the CVSS score of CVE-2018-17057?
CVE-2018-17057 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-17057?
CVE-2018-17057 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Packagist dependencies for CVE-2018-17057?
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-5hw4-m7f3-hhx8",
  "modified" : "2022-10-06T19:53:20Z",
  "published" : "2022-10-06T19:53:20Z",
  "aliases" : [ "CVE-2018-17057" ],
  "summary" : "TCPDF vulnerable to attackers triggering deserialization of arbitrary data",
  "details" : "An issue was discovered in TCPDF before 6.2.22. Attackers can trigger deserialization of arbitrary data via the `phar://` wrapper.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "tecnickcom/tcpdf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.2.22"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "fooman/tcpdf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.2.22"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "la-haute-societe/tcpdf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.2.22"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "spoonity/tcpdf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.2.22"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-17057"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/LimeSurvey/LimeSurvey/commit/1cdd78d27697b3150bb44aaa7af1a81062a591a5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tecnickcom/TCPDF/commit/1861e33fe05f653b67d070f7c106463e7a5c26ed"
  }, {
    "type" : "WEB",
    "url" : "https://contao.org/en/news/security-vulnerability-cve-2018-17057.html"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/fooman/tcpdf/CVE-2018-17057.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/la-haute-societe/tcpdf/CVE-2018-17057.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/spoonity/tcpdf/CVE-2018-17057.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/tecnickcom/tcpdf/CVE-2018-17057.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/wallabag/tcpdf/CVE-2018-17057.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tecnickcom/TCPDF"
  }, {
    "type" : "WEB",
    "url" : "https://www.exploit-db.com/exploits/46634"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/152200/TCPDF-6.2.19-Deserialization-Remote-Code-Execution.html"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/152360/LimeSurvey-Deserialization-Remote-Code-Execution.html"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2019/Mar/36"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-10-06T19:53:20Z",
    "nvd_published_at" : null
  }
}