CVE-2023-31581
Java vulnerability analysis and mitigation

Overview

Dromara Sureness before version 1.0.8 was discovered to contain a hardcoded cryptographic key vulnerability (CVE-2023-31581). The vulnerability was identified in the JsonWebTokenUtil class where a hardcoded secret key was used for creating and verifying JSON Web Tokens (JWTs). This security issue was disclosed on September 6, 2022, and affects the authentication mechanism of web-based APIs (GitHub Issue, Advisory).

Technical details

The vulnerability exists in the JsonWebTokenUtil class within the com.usthe.sureness.util package. The issue stems from using a predictable/constant cryptographic key for JWT operations, which violates security implementation specifications for JWT. This vulnerability is classified as CWE-798 (Use of Hard-coded Credentials) and has been assigned a CVSS v3.1 base score of 9.8 CRITICAL (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) (NVD).

Impact

The presence of a hardcoded cryptographic key could allow attackers to craft arbitrary JWT tokens and subsequently bypass authentication mechanisms for web-based APIs. This vulnerability compromises the security of applications using the affected versions of Sureness, potentially leading to unauthorized access to protected resources (Advisory).

Mitigation and workarounds

The vulnerability has been fixed in Sureness version 1.0.8 and later. Users are recommended to upgrade to the latest version. For those unable to upgrade immediately, it is recommended to avoid using the default key configuration and implement a more secure way to store and manage JWT secrets, following NIST Special Publication 800-57 guidelines (GitHub Issue).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-68931HIGH8.7
  • JavaJava
  • net.gleske:jervis
NoYesJan 13, 2026
CVE-2025-68703HIGH8.7
  • JavaJava
  • net.gleske:jervis
NoYesJan 13, 2026
CVE-2025-68704HIGH8.2
  • JavaJava
  • net.gleske:jervis
NoYesJan 13, 2026
CVE-2025-66169MEDIUM6.9
  • JavaJava
  • org.apache.camel:camel-neo4j
NoYesJan 14, 2026
CVE-2025-68925MEDIUM6.9
  • JavaJava
  • net.gleske:jervis
NoYesJan 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management