The vulnerability lies within the smart contract factory responsible for deploying new user accounts on the Alchemy platform. The analysis of the security advisory and the associated commits indicates that the createWebAuthnAccount function within the AccountFactory.sol contract was flawed.
The root cause appears to be an improper authentication issue (CWE-287) during the account creation process. The vulnerable function likely failed to correctly configure the validation logic for WebAuthn credentials, potentially allowing an attacker to create an account for which they could bypass authentication.
The mitigation strategy involved two key changes:
-
On-Chain Contract Change (Commit 2352c9b692935ba97d98619cb31ba1653eee241f): A new, specialized WebAuthnFactory.sol contract was introduced. This contract contains a corrected version of the createWebAuthnAccount function. The original function on AccountFactory.sol is now deprecated, and developers are instructed to use the new factory. The evidence for this is the modification of test files to use the new factory, indicating a clear migration away from the old, vulnerable implementation.
-
Client-Side SDK Update (Commit b343437a9e4a833c25fed7bc8785a815cbbae0ee): The aa-sdk was patched to direct all WebAuthn account creation requests to the address of the new WebAuthnFactory contract. This ensures that even without direct smart contract interaction, applications using the SDK will use the secure account creation method.
For a security engineer, this means that any system creating Alchemy smart accounts must be updated. It is critical to ensure that the application logic no longer calls createWebAuthnAccount on the old AccountFactory contract. Instead, all new WebAuthn accounts must be created through the new WebAuthnFactory. Updating the @account-kit/smart-contracts package to version 4.52.0 or later is the recommended course of action.