Agent Dart is missing certificate verification checks
High severity
GitHub Reviewed
Published
Oct 15, 2024
in
AstroxNetwork/agent_dart
•
Updated Jan 23, 2025
Description
Published by the National Vulnerability Database
Oct 15, 2024
Published to the GitHub Advisory Database
Oct 15, 2024
Reviewed
Oct 15, 2024
Last updated
Jan 23, 2025
Certificate verification (in lib/agent/certificate.dart) has been found to contain two issues:
- The certificate’s timestamp, i.e /time path, is not verified, meaning that the certificate effectively has no expiration time. The IC spec doesn’t specify an expiry times, it gives some suggestions, quoting: "A reasonable expiry time for timestamps in R.signatures and the certificate Cert is 5 minutes (analogously to the maximum allowed ingress expiry enforced by the IC mainnet). Delegations require expiry times of at least a week since the IC mainnet refreshes the delegations only after replica upgrades which typically happen once a week". For reference you can check how is this implemented in the agent-rs (here and here).
Additionally, seems replica signed queries aren’t implemented
References