CVE-2021-40494: Lxdui AdaptiveScale LXDUI Hardcoded JWT Secret Vulnerability

CRITICAL
Advisory Identifier: GHSA-p4xh-4869-8vrg
CVSS 9.8
CWE-798
Published
Advisory Summary

CVE-2021-40494 is a CRITICAL (CVSS 9.8) adaptivescale lxdui hardcoded jwt secret vulnerability (CWE-798: Use of Hard-coded Credentials) affecting Lxdui libraries in the PyPI ecosystem. The issue involves adaptivescale lxdui hardcoded jwt secret key. Remediation is available in the latest vendor maintenance releases.

CVE-2021-40494 at a Glance

CVE Identifier CVE-2021-40494
GHSA Identifier GHSA-p4xh-4869-8vrg
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-798: Use of Hard-coded Credentials
Affected Product Lxdui
Package Ecosystem PyPI
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-40494

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

lxdui fixed: Latest secure release
pip install lxdui>=Latest secure release
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 lxdui

How to Check if You Are Affected

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

pip show lxdui

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-798: Use of Hard-coded Credentials, where the product contains hard-coded credentials, such as a password or cryptographic key. In Lxdui, 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 Hardcoded JWT Secret Key in `__metadata__.py` metadata.py in AdaptiveScale LXDUI through 2.1.3 allows attackers to gain admin access to the host system.

CVE-2021-40494 Affected Lxdui Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
lxdui
PyPI
≤ 2.1.3

References

Frequently Asked Questions

What is CVE-2021-40494?
CVE-2021-40494 is a security vulnerability in Lxdui involving AdaptiveScale LXDUI Hardcoded JWT Secret Key under CWE-798: Use of Hard-coded Credentials.
Which Lxdui versions are affected?
Affected versions include releases prior to current release patches across affected packages: lxdui.
What version fixes CVE-2021-40494?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is lxdui affected?
Yes, lxdui is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2021-40494?
CVE-2021-40494 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-40494?
CVE-2021-40494 is classified under CWE-798: Use of Hard-coded Credentials (The product contains hard-coded credentials, such as a password or cryptographic key.).
How can I check PyPI dependencies for CVE-2021-40494?
Run the dependency tree command: 'pip show lxdui'. 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-p4xh-4869-8vrg",
  "modified" : "2024-09-30T20:18:44Z",
  "published" : "2022-05-24T19:13:00Z",
  "aliases" : [ "CVE-2021-40494" ],
  "summary" : "AdaptiveScale LXDUI Hardcoded JWT Secret Key",
  "details" : "A Hardcoded JWT Secret Key in `__metadata__.py` metadata.py in AdaptiveScale LXDUI through 2.1.3 allows attackers to gain admin access to the host system.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "lxdui"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-40494"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AdaptiveScale/lxdui/pull/353"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AdaptiveScale/lxdui/commit/e4bffeb9d69a5700a642cb6424453d1894e50d84"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AdaptiveScale/lxdui"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/lxdui/PYSEC-2021-342.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-798" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-22T22:34:01Z",
    "nvd_published_at" : "2021-09-03T02:15:00Z"
  }
}