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).

Exploitability

The vulnerability is exploitable remotely without requiring any privileges or user interaction. While the library provides the ability for users to change the key used for JWT signatures, the presence of a default hardcoded key makes it possible for developers who don't understand JWT security implications to unknowingly use this insecure configuration (GitHub Issue).

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-2026-73644CRITICAL9.6
  • Java logoJava
  • org.openidentityplatform.opendj:opendj-server-legacy
NoYesAug 13, 2026
CVE-2026-73507HIGH7.5
  • Java logoJava
  • io.netty:netty-codec-xml
NoYesAug 13, 2026
CVE-2026-49989HIGH7.1
  • Java logoJava
  • io.crate:crate
NoYesAug 14, 2026
CVE-2026-53660HIGH7
  • Java logoJava
  • org.openidentityplatform.openam:openam-core
NoYesAug 14, 2026
CVE-2026-73508MEDIUM5.3
  • Java logoJava
  • keycloak-fips-26.7
NoYesAug 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