GHSA-6wjw-qf87-fv5v: Illuminate/encryption Laravel Encrypter Failure To Decryption Vulnerability

LOW
CWE-1240
Published
Advisory Summary

GHSA-6wjw-qf87-fv5v is a LOW laravel encrypter failure to decryption vulnerability (CWE-1240: Use of a Cryptographic Primitive with a Risky Implementation) affecting Illuminate/encryption libraries in the Packagist ecosystem. The issue involves laravel encrypter failure to decryption vulnerability. Remediation is available by upgrading affected packages to version 5.5.40, 5.6.15.

GHSA-6wjw-qf87-fv5v at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-6wjw-qf87-fv5v
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-1240: Use of a Cryptographic Primitive with a Risky Implementation
Affected Product Illuminate/encryption
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix GHSA-6wjw-qf87-fv5v

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

illuminate/encryption fixed: 5.5.40
Upgrade illuminate/encryption to 5.5.40
illuminate/encryption fixed: 5.6.15
Upgrade illuminate/encryption to 5.6.15
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 illuminate/encryption

How to Check if You Are Affected

To determine whether your application is affected by GHSA-6wjw-qf87-fv5v, inspect your project dependencies for Illuminate/encryption:

inspect dependencies for illuminate/encryption

Analyze the terminal output to locate any version of Illuminate/encryption in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.5.40), 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-1240: Use of a Cryptographic Primitive with a Risky Implementation, where to fulfill the need for a cryptographic primitive, the product implements a cryptographic algorithm using a non-standard, unproven, or disallowed/non-compliant cryptographic implementation. In Illuminate/encryption, 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

A potential exploit of the Laravel Encrypter component that may cause the Encrypter to fail on decryption and unexpectedly return false. To exploit this, the attacker must be able to modify the encrypted payload before it is decrypted. Depending on the code within your application, this could lead to unexpected behavior when combined with weak type comparisons, for example: ```php <?php $decyptedValue = decrypt($secret); if ($decryptedValue == '') { // Code is run even though decrypted value is false... } ```

GHSA-6wjw-qf87-fv5v Affected Illuminate/encryption Versions

2 component(s)
Fixed Versions:
5.5.405.6.15
Product / Package Ecosystem Affected Versions Fixed Version
illuminate/encryption
Packagist
≥ 5.5.0
< 5.5.40
5.5.40
illuminate/encryption
Packagist
≥ 5.6.0
< 5.6.15
5.6.15

References

Frequently Asked Questions

What is GHSA-6wjw-qf87-fv5v?
GHSA-6wjw-qf87-fv5v is a security vulnerability in Illuminate/encryption involving Laravel Encrypter Failure to decryption vulnerability under CWE-1240: Use of a Cryptographic Primitive with a Risky Implementation.
Which Illuminate/encryption versions are affected?
Affected versions include releases prior to 5.5.40, 5.6.15 across affected packages: illuminate/encryption.
What version fixes GHSA-6wjw-qf87-fv5v?
Upgrading to 5.5.40, 5.6.15 (or the latest patched release for your respective branch) resolves the vulnerability.
Is illuminate/encryption affected?
Yes, illuminate/encryption is affected in releases prior to 5.5.40, 5.6.15. Upgrade your dependency to 5.5.40, 5.6.15 or later.
What CWE is associated with GHSA-6wjw-qf87-fv5v?
GHSA-6wjw-qf87-fv5v is classified under CWE-1240: Use of a Cryptographic Primitive with a Risky Implementation (To fulfill the need for a cryptographic primitive, the product implements a cryptographic algorithm using a non-standard, unproven, or disallowed/non-compliant cryptographic implementation.).
How can I check Packagist dependencies for GHSA-6wjw-qf87-fv5v?
Run the dependency tree command: 'inspect dependencies for illuminate/encryption'. 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-6wjw-qf87-fv5v",
  "modified" : "2024-05-15T22:01:01Z",
  "published" : "2024-05-15T22:01:01Z",
  "aliases" : [ ],
  "summary" : "Laravel Encrypter Failure to decryption vulnerability",
  "details" : "A potential exploit of the Laravel Encrypter component that may cause the Encrypter to fail on decryption and unexpectedly return false.\n\nTo exploit this, the attacker must be able to modify the encrypted payload before it is decrypted. Depending on the code within your application, this could lead to unexpected behavior when combined with weak type comparisons, for example:\n\n```php\n<?php\n\n$decyptedValue = decrypt($secret);\n\nif ($decryptedValue == '') {\n    // Code is run even though decrypted value is false...\n}\n```",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "illuminate/encryption"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.5.0"
      }, {
        "fixed" : "5.5.40"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "illuminate/encryption"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.6.0"
      }, {
        "fixed" : "5.6.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/illuminate/encryption/commit/51667a52bd7d135c6aa40a897656ffe9d3cd072d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/illuminate/encryption/commit/c80b1da6a0412bd74bd56dc80f6126f561631b05"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/illuminate/encryption/2018-03-30-1.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/illuminate/encryption"
  }, {
    "type" : "WEB",
    "url" : "https://medium.com/@taylorotwell/laravel-security-release-5-6-15-and-5-5-40-56f1257933a0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1240" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-15T22:01:01Z",
    "nvd_published_at" : null
  }
}