CVE-2019-16774: Phpfastcache/phpfastcache Object Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-484f-743f-6jx2
CVSS 4.4
CWE-94
Published
Advisory Summary

CVE-2019-16774 is a MODERATE (CVSS 4.4) object injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Phpfastcache/phpfastcache libraries in the Packagist ecosystem. The issue involves object injection in cookie driver in phpfastcache. Remediation is available by upgrading affected packages to version 5.0.13.

CVE-2019-16774 at a Glance

CVE Identifier CVE-2019-16774
GHSA Identifier GHSA-484f-743f-6jx2
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Phpfastcache/phpfastcache
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.4

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

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

How to Fix CVE-2019-16774

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

phpfastcache/phpfastcache fixed: 5.0.13
Upgrade phpfastcache/phpfastcache to 5.0.13
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 phpfastcache/phpfastcache

How to Check if You Are Affected

To determine whether your application is affected by CVE-2019-16774, inspect your project dependencies for Phpfastcache/phpfastcache:

inspect dependencies for phpfastcache/phpfastcache

Analyze the terminal output to locate any version of Phpfastcache/phpfastcache in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.13), 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Phpfastcache/phpfastcache, 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

### Impact An possible object injection has been discovered in cookie driver prior 5.0.13 versions (of 5.x releases). ### Patches The issue has been addressed by enforcing JSON conversion when deserializing ### Workarounds If you can't fix it, use another driver such as "Files" (Filesystem) ### References Fixing release: https://github.com/PHPSocialNetwork/phpfastcache/releases/tag/5.0.13 ### For more information If you have any questions or comments about this advisory: * Open an issue in [the issue tracker](https://github.com/PHPSocialNetwork/phpfastcache/issues) * Email us at [security@geolim4.com](mailto:security@geolim4.com)

CVE-2019-16774 Affected Phpfastcache/phpfastcache Versions

1 component(s)
Fixed Versions:
5.0.13
Product / Package Ecosystem Affected Versions Fixed Version
phpfastcache/phpfastcache
Packagist
≥ 5.0.0
< 5.0.13
5.0.13

References

Frequently Asked Questions

What is CVE-2019-16774?
CVE-2019-16774 is a security vulnerability in Phpfastcache/phpfastcache involving Object injection in cookie driver in phpfastcache under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Phpfastcache/phpfastcache versions are affected?
Affected versions include releases prior to 5.0.13 across affected packages: phpfastcache/phpfastcache.
What version fixes CVE-2019-16774?
Upgrading to 5.0.13 (or the latest patched release for your respective branch) resolves the vulnerability.
Is phpfastcache/phpfastcache affected?
Yes, phpfastcache/phpfastcache is affected in releases prior to 5.0.13. Upgrade your dependency to 5.0.13 or later.
What is the CVSS score of CVE-2019-16774?
CVE-2019-16774 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2019-16774?
CVE-2019-16774 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Packagist dependencies for CVE-2019-16774?
Run the dependency tree command: 'inspect dependencies for phpfastcache/phpfastcache'. 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-484f-743f-6jx2",
  "modified" : "2022-07-05T18:07:34Z",
  "published" : "2019-12-12T22:50:20Z",
  "aliases" : [ "CVE-2019-16774" ],
  "summary" : "Object injection in cookie driver in phpfastcache",
  "details" : "### Impact\nAn possible object injection has been discovered in cookie driver prior 5.0.13 versions (of 5.x releases).\n\n### Patches\nThe issue has been addressed by enforcing JSON conversion when deserializing\n\n### Workarounds\nIf you can't fix it, use another driver such as \"Files\" (Filesystem)\n\n### References\nFixing release: https://github.com/PHPSocialNetwork/phpfastcache/releases/tag/5.0.13\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the issue tracker](https://github.com/PHPSocialNetwork/phpfastcache/issues)\n* Email us at [security@geolim4.com](mailto:security@geolim4.com)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpfastcache/phpfastcache"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.13"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/PHPSocialNetwork/phpfastcache/security/advisories/GHSA-484f-743f-6jx2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-16774"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/PHPSocialNetwork/phpfastcache/commit/c4527205cb7a402b595790c74310791f5b04a1a4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/PHPSocialNetwork/phpfastcache"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/PHPSocialNetwork/phpfastcache/releases/tag/5.0.13"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-484f-743f-6jx2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:57:47Z",
    "nvd_published_at" : null
  }
}