
Cloud Vulnerability DB
A community-led vulnerabilities database
When a 2FA account is shared with another user, the single-account read endpoint
GET /api/v1/twofaccounts/{id}?withOtp=1 honours a caller-supplied at timestamp and returns the
TOTP code valid at that time. A share recipient can advance at into the future and collect codes
that are valid at those future times. Because revoking a share does not rotate the account's TOTP
secret, every pre-collected code keeps working after the share is revoked. None of these reads
dispatch the OtpGenerated event, so they never appear in the owner's OTP log which is the owner's only
visibility into recipient activity. Breaks revocation and auditability (Moderate since it needs sharing enabled)
Type of issue: broken access control / incorrect authorization, plus an audit-logging gap. Verified on master @ 84eb0e00847b043d0a245427dda2216127046660 (release 9.0.2):
$otp = $this->getOtp($request->at);
passes the client-supplied at straight into code generation, unclamped.view ability,
which allows share recipients (app/Policies/TwoFAccountPolicy.php:33:
isOwnedBy($user) || isSharedWith($user)).getOTP($time) uses that timestamp
(generated_at = $time ?: time()), so any at yields that window's valid code.$request->merge(['at' => now()->timestamp]); the single-account show path has no such clamp.
This shows "return the current code" was the intent, and the show path simply forgot to clamp.view ability includes
recipients), that read honours an arbitrary at, and it is the one OTP-returning path that is not
audited.Configuration required: account sharing enabled (enableSharing, off by default), and the owner has shared at least one account with the attacker (user-scoped share, or an "all users" share). Steps (all over the public API; the recipient's own session can issue them):
Who is impacted: any 2FAuth instance using the account-sharing feature. The attacker is a user the owner has shared an account with (a lower-privileged party for e.g. a contractor, or a colleague given temporary access). Impact: in seconds the recipient can download a long run of future codes. After the owner revokes the share, they believe that the is gone but the recipient still holds working second-factor codes for every window they harvested (the PoC shows 30 days), and the owner's audit log shows nothing. In effect it is a durable, invisible copy of the shared second factor that survives revocation, breaking both guarantees the sharing feature is built on (revocation and auditability). Suggested remediation:
at on the show/withOtp path (mirror the list path's
at = now), or honour a caller at only for the account owner.Source: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."