CVE-2022-31157: Packbackbooks/lti 1 3 php library LTI 1.3 Tool Library's Function Vulnerability

HIGH
Advisory Identifier: GHSA-768m-5w34-2xf5
CVSS 7.5
CWE-327 CWE-330
Published
Advisory Summary

CVE-2022-31157 is a HIGH (CVSS 7.5) lti 1.3 tool library's function vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Packbackbooks/lti 1 3 php library libraries in the Packagist ecosystem. The issue involves lti 1.3 tool library's function used to generate random nonces not sufficiently cryptographically complex before v5.0. Remediation is available by upgrading affected packages to version 5.0.

CVE-2022-31157 at a Glance

CVE Identifier CVE-2022-31157
GHSA Identifier GHSA-768m-5w34-2xf5
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Packbackbooks/lti 1 3 php library
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2022-31157

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

packbackbooks/lti-1-3-php-library fixed: 5.0
Upgrade packbackbooks/lti-1-3-php-library to 5.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 packbackbooks/lti-1-3-php-library

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-31157, inspect your project dependencies for Packbackbooks/lti 1 3 php library:

inspect dependencies for packbackbooks/lti-1-3-php-library

Analyze the terminal output to locate any version of Packbackbooks/lti 1 3 php library in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.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-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Packbackbooks/lti 1 3 php library, 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 The function used to generate random nonces was not sufficiently cryptographically complex. As a result values may be predictable and tokens may be forgable. ### Patches Users should upgrade to version 5.0 immediately ### Workarounds None.

CVE-2022-31157 Affected Packbackbooks/lti 1 3 php library Versions

1 component(s)
Fixed Versions:
5.0
Product / Package Ecosystem Affected Versions Fixed Version
packbackbooks/lti-1-3-php-library
Packagist
< 5.0
5.0

References

Frequently Asked Questions

What is CVE-2022-31157?
CVE-2022-31157 is a security vulnerability in Packbackbooks/lti 1 3 php library involving LTI 1.3 Tool Library's function used to generate random nonces not sufficiently cryptographically complex before v5.0 under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Packbackbooks/lti 1 3 php library versions are affected?
Affected versions include releases prior to 5.0 across affected packages: packbackbooks/lti-1-3-php-library.
What version fixes CVE-2022-31157?
Upgrading to 5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is packbackbooks/lti-1-3-php-library affected?
Yes, packbackbooks/lti-1-3-php-library is affected in releases prior to 5.0. Upgrade your dependency to 5.0 or later.
What is the CVSS score of CVE-2022-31157?
CVE-2022-31157 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2022-31157?
CVE-2022-31157 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check Packagist dependencies for CVE-2022-31157?
Run the dependency tree command: 'inspect dependencies for packbackbooks/lti-1-3-php-library'. 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-768m-5w34-2xf5",
  "modified" : "2022-07-25T19:25:08Z",
  "published" : "2022-07-15T20:55:46Z",
  "aliases" : [ "CVE-2022-31157" ],
  "summary" : "LTI 1.3 Tool Library's function used to generate random nonces not sufficiently cryptographically complex before v5.0",
  "details" : "### Impact\n\nThe function used to generate random nonces was not sufficiently cryptographically complex. As a result values may be predictable and tokens may be forgable.\n\n### Patches\n\nUsers should upgrade to version 5.0 immediately\n\n### Workarounds\n\nNone.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "packbackbooks/lti-1-3-php-library"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/packbackbooks/lti-1-3-php-library/security/advisories/GHSA-768m-5w34-2xf5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31157"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/packbackbooks/lti-1-3-php-library/commit/de19e8a0b28cdc7750fa3ca98471eeed26ba3e57"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/packbackbooks/lti-1-3-php-library"
  }, {
    "type" : "WEB",
    "url" : "https://openid.net/specs/openid-connect-core-1_0.html#IDToken"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-327", "CWE-330" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-15T20:55:46Z",
    "nvd_published_at" : "2022-07-15T18:15:00Z"
  }
}