F-2026-0018·weak-existence-check

Mandatory native permit check bypassable with zero value

Fixedbridgecross-chainkey-registrygithub.com/pdxwebdev/yadakeyeventwallet
TL;DR

The native-permit existence check only validates structural presence in the permits array, so a no-op permit with zero value, zero amount, and no recipients satisfies the check and bypasses the mandatory BNB payment intent.

Severity
LOW
Impact
LOW
Likelihood
MEDIUM
Method
MManual review
CAT.
Complexity
LOW
Exploitability
LOW
02Section · Description

Description

The pre-flight validation loop in _executePermits requires a native BNB permit (token == address(0)) to exist in the permits array:

solidity
// Bridge.sol lines 222-240
for (uint256 i = 0; i < ectx.permits.length; i++) {
PermitData memory permit = ectx.permits[i];
if (permit.token == address(0)) {
hasNativeTransfer = true;
}
// ...
}
if (!hasNativeTransfer) revert MissingPermit();

However, this check only validates the structural presence of a native permit in the array, it does not enforce:

  • msg.value > 0
  • permit.amount > 0
  • That the permit has any recipients

Since registerKeyPairWithTransfer is payable, it accepts msg.value = 0. A caller can satisfy the mandatory native permit check with a no-op entry:

solidity
{
token: address(0),
amount: 0,
deadline: 0,
v: 0,
r: 0,
s: 0,
recipients: []
}

The strict accounting check (totalTransferred != permit.amount) passes because 0 == 0.

If the intent was to force every transaction to include a BNB payment, this does not achieve it, users can bypass it with a zero-amount native permit.

03Section · Recommendation

Recommendation

If BNB payment is mandatory, add an explicit msg.value floor:

solidity
if (!hasNativeTransfer) revert MissingPermit();
require(msg.value > 0, "Native BNB payment required");
04Section · Resolution

Resolution

YadaCoin, Confirmed.

Zealynx, Fixed.

Status
Fixed
F-2026-0018

oog
zealynx

Smart Contract Security Digest

Monthly exploit breakdowns, audit checklists, and DeFi security research — straight to your inbox

© 2026 Zealynx