CVE-2021-23803: Latte/latte Incorrect Authorization Vulnerability

CRITICAL
Advisory Identifier: GHSA-6pj2-5fqq-xvjc
CVSS 9.8
CWE-863
Published
Advisory Summary

CVE-2021-23803 is a CRITICAL (CVSS 9.8) incorrect authorization vulnerability (CWE-863: Incorrect Authorization) affecting Latte/latte libraries in the Packagist ecosystem. The issue involves incorrect authorization in latte/latte. Remediation is available by upgrading affected packages to version 2.10.6.

CVE-2021-23803 at a Glance

CVE Identifier CVE-2021-23803
GHSA Identifier GHSA-6pj2-5fqq-xvjc
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-863: Incorrect Authorization
Affected Product Latte/latte
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.1/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-2021-23803

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

latte/latte fixed: 2.10.6
Upgrade latte/latte to 2.10.6
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 latte/latte

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-23803, inspect your project dependencies for Latte/latte:

inspect dependencies for latte/latte

Analyze the terminal output to locate any version of Latte/latte in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.6), 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Latte/latte, 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

This affects the package latte/latte before 2.10.6. There is a way to bypass allowFunctions that will affect the security of the application. When the template is set to allow/disallow the use of certain functions, adding control characters (x00-x08) after the function will bypass these restrictions.

CVE-2021-23803 Affected Latte/latte Versions

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

References

Frequently Asked Questions

What is CVE-2021-23803?
CVE-2021-23803 is a security vulnerability in Latte/latte involving Incorrect Authorization in latte/latte under CWE-863: Incorrect Authorization.
Which Latte/latte versions are affected?
Affected versions include releases prior to 2.10.6 across affected packages: latte/latte.
What version fixes CVE-2021-23803?
Upgrading to 2.10.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is latte/latte affected?
Yes, latte/latte is affected in releases prior to 2.10.6. Upgrade your dependency to 2.10.6 or later.
What is the CVSS score of CVE-2021-23803?
CVE-2021-23803 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-23803?
CVE-2021-23803 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Packagist dependencies for CVE-2021-23803?
Run the dependency tree command: 'inspect dependencies for latte/latte'. 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-6pj2-5fqq-xvjc",
  "modified" : "2022-01-06T18:54:41Z",
  "published" : "2022-01-06T20:56:27Z",
  "aliases" : [ "CVE-2021-23803" ],
  "summary" : "Incorrect Authorization in latte/latte",
  "details" : "This affects the package latte/latte before 2.10.6. There is a way to bypass allowFunctions that will affect the security of the application. When the template is set to allow/disallow the use of certain functions, adding control characters (x00-x08) after the function will bypass these restrictions.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "latte/latte"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.10.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23803"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nette/latte/issues/279"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nette/latte/commit/227c86eda9a8a6d060ea8501923e768b6d992210"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nette/latte"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-PHP-LATTELATTE-1932226"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-01-06T18:54:41Z",
    "nvd_published_at" : "2021-12-17T20:15:00Z"
  }
}