Submitted by cmichel
The signature check in recoverFulfillSignature() only uses transaction ID (along with the relayer fee) which can be accidentally reused by the user, in which case the older signatures with the older relayer fees can be replayed.  The signature should be on the entire digest hashInvariantTransactionData(txData) as indicated in the comment on L306.
The impact is that,  If the user signatures are indeed on the digest as indicated by the comment, the signature/address check in fulfill() will fail. If not, they may be accidentally/intentionally replayed with same transaction ID, which also appears to be an outstanding question as indicated by the comment on L12.
recoverCancelSignature() similarly uses only tx ID.
Unless there is a good reason not to, it is safer to include hashInvariantTransactionData(txData) in signatures so that they cannot be replayed with different txData (but same tx ID) whose preparedBlockNumber is > 0.
Recommend evaluating if the signature should contain only tx ID, or the entire digest, and then changing the logic appropriately.
LayneHaber (Connext) acknowledged:
ghoul-sol (Judge) commented:
