Vulnerabilities in pkg:maven/top.tangyh.basic/lamp-util

PACKAGE
Advisory Identifier: GHSA-xr8c-mq5x-5f56
Advisory Summary

CVE-2023-31579 is a HIGH (CVSS 7.5) dromara lamp-cloud use of hard-coded vulnerability (CWE-798: Use of Hard-coded Credentials) affecting Lamp core libraries in the Maven ecosystem. The issue involves dromara lamp-cloud use of hard-coded cryptographic key. Remediation is available by upgrading affected packages to version 3.8.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/top.tangyh.basic/lamp-util

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/top.tangyh.basic/lamp-util. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-xr8c-mq5x-5f56 CVE-2023-31579 HIGH Dromara Lamp-Cloud Use of Hard-coded Cryptographic Key

CVE-2023-31579 at a Glance

CVE Identifier CVE-2023-31579
GHSA Identifier GHSA-xr8c-mq5x-5f56
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-798: Use of Hard-coded Credentials
Affected Product Lamp core
Package Ecosystem Maven
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:H/I:N/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 None (I:N)
Availability None (A:N)

How to Fix CVE-2023-31579

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

top.tangyh.basic:lamp-core fixed: 3.8.1
<dependency>
    <groupId>top.tangyh.basic</groupId>
    <artifactId>lamp-core</artifactId>
    <version>3.8.1</version>
</dependency>
top.tangyh.basic:lamp-util fixed: 3.8.1
<dependency>
    <groupId>top.tangyh.basic</groupId>
    <artifactId>lamp-util</artifactId>
    <version>3.8.1</version>
</dependency>
Verify Direct and Transitive Dependencies

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

mvn dependency:tree -Dincludes=top.tangyh.basic

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-31579, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=top.tangyh.basic

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

Note: The mvn dependency:tree -Dincludes=top.tangyh.basic command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

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 Lamp core, 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

Dromara Lamp-Cloud before v3.8.1 was discovered to use a hardcoded cryptographic key when creating and verifying a Json Web Token. This vulnerability allows attackers to authenticate to the application via a crafted JWT token.

CVE-2023-31579 Affected Lamp core Versions

2 component(s)
Fixed Versions:
3.8.1
Product / Package Ecosystem Affected Versions Fixed Version
top.tangyh.basic:lamp-core
Maven
< 3.8.1
3.8.1
top.tangyh.basic:lamp-util
Maven
< 3.8.1
3.8.1

References

Frequently Asked Questions

What is CVE-2023-31579?
CVE-2023-31579 is a security vulnerability in Lamp core involving Dromara Lamp-Cloud Use of Hard-coded Cryptographic Key under CWE-798: Use of Hard-coded Credentials.
Which Lamp core versions are affected?
Affected versions include releases prior to 3.8.1 across affected packages: top.tangyh.basic:lamp-core, top.tangyh.basic:lamp-util.
What version fixes CVE-2023-31579?
Upgrading to 3.8.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is lamp-core affected?
Yes, top.tangyh.basic:lamp-core is affected in releases prior to 3.8.1. Upgrade your dependency to 3.8.1 or later.
Is lamp-util affected?
Yes, top.tangyh.basic:lamp-util is affected in releases prior to 3.8.1. Upgrade your dependency to 3.8.1 or later.
What is the CVSS score of CVE-2023-31579?
CVE-2023-31579 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:H/I:N/A:N.
What CWE is associated with CVE-2023-31579?
CVE-2023-31579 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 Maven dependencies for CVE-2023-31579?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=top.tangyh.basic'. 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-xr8c-mq5x-5f56",
  "modified" : "2023-11-03T19:23:51Z",
  "published" : "2023-11-03T00:30:26Z",
  "aliases" : [ "CVE-2023-31579" ],
  "summary" : "Dromara Lamp-Cloud Use of Hard-coded Cryptographic Key",
  "details" : "Dromara Lamp-Cloud before v3.8.1 was discovered to use a hardcoded cryptographic key when creating and verifying a Json Web Token. This vulnerability allows attackers to authenticate to the application via a crafted JWT token.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "top.tangyh.basic:lamp-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "top.tangyh.basic:lamp-util"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.8.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-31579"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dromara/lamp-cloud/issues/183"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dromara/lamp-cloud/commit/31f79b122d85ed1b4f354673212692aa8205437a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xubowenW/JWTissues/blob/main/lamp%20issue.md"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-798" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-11-03T19:23:51Z",
    "nvd_published_at" : "2023-11-02T22:15:08Z"
  }
}