CVE-2023-33175: Toui Toui Allows User-specific Variables To Vulnerability

CRITICAL
Advisory Identifier: GHSA-hh7j-pg39-q563
CVSS 9.1
CWE-913 CWE-914
Published
Advisory Summary

CVE-2023-33175 is a CRITICAL (CVSS 9.1) toui allows user-specific variables to vulnerability (CWE-913: Improper Control of Dynamically-Managed Code Resources) affecting Toui libraries in the PyPI ecosystem. The issue involves toui allows user-specific variables to be shared between users. Remediation is available by upgrading affected packages to version 2.4.1.

CVE-2023-33175 at a Glance

CVE Identifier CVE-2023-33175
GHSA Identifier GHSA-hh7j-pg39-q563
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-913: Improper Control of Dynamically-Managed Code Resources
Affected Product Toui
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.1

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

How to Fix CVE-2023-33175

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

toui fixed: 2.4.1
pip install toui>=2.4.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show toui

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2023-33175, inspect your installed packages using pip:

pip show toui

Analyze the terminal output to locate any version of Toui in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.1), your application is affected.

Note: The pip show toui command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-913: Improper Control of Dynamically-Managed Code Resources, where the product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements. In Toui, 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 Websites that use `Website.user_vars` property in versions. ### Patches It affects versions v2.0.1 to v2.4.0. Please upgrade to v2.4.1 ### Workarounds Do not use `Website.user_vars` in websites when using versions v2.0.1 to v2.4.0. Also, do not use `Website.signin_user()` in version v2.4.0 only. ### Explanation ToUI is using Flask-Caching (SimpleCache) to store user variables. My misunderstanding was that these caches are stored in the client's browser, but it seems that these are stored in the server side.

CVE-2023-33175 Affected Toui Versions

1 component(s)
Fixed Versions:
2.4.1
Product / Package Ecosystem Affected Versions Fixed Version
toui
PyPI
≥ 2.0.1
< 2.4.1
2.4.1

References

Frequently Asked Questions

What is CVE-2023-33175?
CVE-2023-33175 is a security vulnerability in Toui involving toui allows user-specific variables to be shared between users under CWE-913: Improper Control of Dynamically-Managed Code Resources.
Which Toui versions are affected?
Affected versions include releases prior to 2.4.1 across affected packages: toui.
What version fixes CVE-2023-33175?
Upgrading to 2.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is toui affected?
Yes, toui is affected in releases prior to 2.4.1. Upgrade your dependency to 2.4.1 or later.
What is the CVSS score of CVE-2023-33175?
CVE-2023-33175 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2023-33175?
CVE-2023-33175 is classified under CWE-913: Improper Control of Dynamically-Managed Code Resources (The product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements.).
How can I check PyPI dependencies for CVE-2023-33175?
Run the dependency tree command: 'pip show toui'. 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-hh7j-pg39-q563",
  "modified" : "2023-05-30T06:41:13Z",
  "published" : "2023-05-24T17:38:52Z",
  "aliases" : [ "CVE-2023-33175" ],
  "summary" : "toui allows user-specific variables to be shared between users",
  "details" : "### Impact\nWebsites that use `Website.user_vars` property in versions.\n\n### Patches\nIt affects versions v2.0.1 to v2.4.0. Please upgrade to v2.4.1\n\n### Workarounds\nDo not use `Website.user_vars` in websites when using versions v2.0.1 to v2.4.0. Also, do not use `Website.signin_user()` in version v2.4.0 only.\n\n### Explanation\nToUI is using Flask-Caching (SimpleCache) to store user variables. My misunderstanding was that these caches are stored in the client's browser, but it seems that these are stored in the server side.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "toui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.1"
      }, {
        "fixed" : "2.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mubarakalmehairbi/ToUI/security/advisories/GHSA-hh7j-pg39-q563"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-33175"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mubarakalmehairbi/ToUI"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mubarakalmehairbi/ToUI/releases/tag/v2.4.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-913", "CWE-914" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-24T17:38:52Z",
    "nvd_published_at" : "2023-05-30T05:15:11Z"
  }
}