Event restrictionscreated uses wrong owner
When a new whitelist restriction is created, the RestrictionsCreated event records the caller as the owner even though the contract may have been initialised with a different admin address. Systems that index or monitor these events would therefore receive incorrect ownership information.
- Disclosed after under an hour
51286 sc low event restrictionscreated uses wrong owner
Submitted on Aug 1st 2025 at 12:25:00 UTC by @p1ranh4 for Attackathon | Plume Network
- Report ID: #51286
- Report Type: Smart Contract
- Severity: Low
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/arc/src/restrictions/RestrictionsFactory.sol
- Impacts:
- Contract fails to deliver promised returns, but doesn't lose value
Description
Brief / Intro
The event RestrictionsCreated emitted when creating a new Whitelist restriction uses the wrong owner address.
Vulnerability Details
This issue will mess up with external indexing services or systems that rely on correct data.
{% code title="RestrictionsFactory.createWhitelistRestrictions (excerpt)" %}
{% endcode %}
function createWhitelistRestrictions(address admin) external returns (address) {
// Deploy a fresh implementation
WhitelistRestrictions implementation = new WhitelistRestrictions();
// Add the implementation to the whitelist
FactoryStorage storage fs = _getFactoryStorage();
bytes32 codeHash = _getCodeHash(address(implementation));
fs.allowedImplementations[codeHash] = true;
// Deploy proxy with the fresh implementation
bytes memory initData =
abi.encodeWithSelector(WhitelistRestrictions.initialize.selector, admin != address(0) ? admin : msg.sender); // @audit
address proxy = _deployProxy(address(implementation), initData);
// Store the mapping
fs.restrictionsToImplementation[proxy] = address(implementation);
emit RestrictionsCreated(proxy, msg.sender, address(implementation), "Whitelist"); // @audit
emit ImplementationWhitelisted(address(implementation));
return proxy;
}
The contract is created with the admin being either: admin or msg.sender if admin == address(0), however, the event will always emit with msg.sender as the owner.
In the current context, msg.sender as owner means nothing as this information is not stored anywhere. When an admin is set, the msg.sender has no special "access" or role. It is not relevant to emit the event in that way.
Maybe renaming the owner event parameter to admin would also make more sense.
Impact Details
{% hint style="warning" %} Breaks external systems and emits wrong information. This affects the contract's external interface and data integrity. Many systems in the DeFi ecosystem rely heavily on events for indexing and monitoring. {% endhint %}
References
Proof of Concept
No PoC provided.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The event emission hard-codes msg.sender as the owner instead of using the same admin-or-caller value that was passed to the initialiser.
Impact
External indexing and monitoring systems could record the wrong owner for a restriction, affecting data integrity, though no value is lost.
What the attacker needed
None
The fix
The event should emit the same resolved admin address that was used to initialise the contract, and the parameter could be renamed to admin for clarity.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract can announce things it does by emitting an event, which outside programs read to keep their own records. Here the announcement names the wrong person as the owner of the new restriction, so anyone relying on that announcement gets a false picture. No funds are lost; the problem is incorrect information.
What is Smart contracts?
Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.