CVE-2015-2171: Slim/slim Slim Vulnerable To PHP Object Vulnerability

HIGH
Advisory Identifier: GHSA-74mf-vjpg-9xh7
CWE-94
Published
Advisory Summary

CVE-2015-2171 is a HIGH slim vulnerable to php object vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Slim/slim libraries in the Packagist ecosystem. The issue involves slim vulnerable to php object injection. Remediation is available by upgrading affected packages to version 2.6.0.

CVE-2015-2171 at a Glance

CVE Identifier CVE-2015-2171
GHSA Identifier GHSA-74mf-vjpg-9xh7
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Slim/slim
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2015-2171

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

slim/slim fixed: 2.6.0
Upgrade slim/slim to 2.6.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 slim/slim

How to Check if You Are Affected

To determine whether your application is affected by CVE-2015-2171, inspect your project dependencies for Slim/slim:

inspect dependencies for slim/slim

Analyze the terminal output to locate any version of Slim/slim in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.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-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 Slim/slim, 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

Middleware/SessionCookie.php in Slim before 2.6.0 allows remote attackers to conduct PHP object injection attacks and execute arbitrary PHP code via crafted session data.

CVE-2015-2171 Affected Slim/slim Versions

1 component(s)
Fixed Versions:
2.6.0
Product / Package Ecosystem Affected Versions Fixed Version
slim/slim
Packagist
< 2.6.0
2.6.0

References

Frequently Asked Questions

What is CVE-2015-2171?
CVE-2015-2171 is a security vulnerability in Slim/slim involving Slim vulnerable to PHP object injection under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Slim/slim versions are affected?
Affected versions include releases prior to 2.6.0 across affected packages: slim/slim.
What version fixes CVE-2015-2171?
Upgrading to 2.6.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is slim/slim affected?
Yes, slim/slim is affected in releases prior to 2.6.0. Upgrade your dependency to 2.6.0 or later.
What CWE is associated with CVE-2015-2171?
CVE-2015-2171 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-2015-2171?
Run the dependency tree command: 'inspect dependencies for slim/slim'. 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-74mf-vjpg-9xh7",
  "modified" : "2024-04-25T22:23:09Z",
  "published" : "2022-05-17T03:34:17Z",
  "aliases" : [ "CVE-2015-2171" ],
  "summary" : "Slim vulnerable to PHP object injection",
  "details" : "Middleware/SessionCookie.php in Slim before 2.6.0 allows remote attackers to conduct PHP object injection attacks and execute arbitrary PHP code via crafted session data.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "slim/slim"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.6.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-2171"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/slimphp/Slim/issues/1034"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/slimphp/Slim/commit/9fa651474eb4d3bb0ce40dd5a55c51bb861c2658"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/slim/slim/CVE-2015-2171.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/slimphp/Slim"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200229032229/http://www.securityfocus.com/bid/70087"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2015/Mar/16"
  }, {
    "type" : "WEB",
    "url" : "http://www.slimframework.com/2015/03/01/version-260.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-25T22:23:09Z",
    "nvd_published_at" : "2015-03-30T14:59:00Z"
  }
}