Bounty
XE-0132 · Bounty

XE Network Vulnerability Report

Closed · invalid —claimed Medium xe#221 filed 2026-10-30 14:02 UTC by toneey26

Report

future_timestamp_security_test.go.txt future_timestamp_test-output.log

Title: Future-Dated Directory Registrations Bypass TTL Expiration
Severity: Medium (availability / stale-record persistence)
Target: github.com/xeprotocol/xe, commit 978785929bc17a2f4ab30c383e5fc9cf4d634512
Testing: Local-only static analysis and unit-test reproduction. No public node or production system was contacted.

Summary

directory.VerifyRegistration accepts any non-zero signed timestamp but does not reject timestamps in the future. directory.Directory.Lookup, List, and Prune calculate expiration as now - reg.Timestamp. For a future timestamp, this value is negative, so the registration is considered fresh until the future timestamp is reached and the TTL elapses.

An attacker who controls a valid account key can submit a signed registration with a timestamp far in the future. The record can then remain active in the directory for approximately the chosen future offset plus the configured TTL, overriding later registrations with ordinary timestamps because Register keeps the highest timestamp.

Affected Code

  • directory/verify.go: validates Timestamp == 0 only; no future-skew limit.
  • directory/directory.go:43-49: accepts a registration when its timestamp is higher than the stored timestamp.
  • directory/directory.go:61, directory/directory.go:81, directory/directory.go:95: expiration uses now - reg.Timestamp, allowing negative age values.

Reproduction

The local test creates a valid signed registration with a timestamp 365 days in the future, registers it in a directory with a one-minute TTL, and immediately performs Lookup. The record is accepted and returned as valid.

Command:

powershell.exe -NoProfile -Command 'Set-Location "C:\Users\User\xe-audit"; & "C:\Users\User\local\go\bin\go.exe" test ./directory -run TestFutureDatedRegistrationNeverExpires -v -count=1'

Observed output:

=== RUN   TestFutureDatedRegistrationNeverExpires
    future_timestamp_security_test.go:28: future-dated registration remains valid: timestamp=1824904398773704700, now=1793368398774251600
--- PASS: TestFutureDatedRegistrationNeverExpires (0.00s)
PASS
ok      github.com/xeprotocol/xe/directory      1.004s

The timestamp is approximately one year ahead of now, yet Lookup returns the registration as valid despite a one-minute TTL.

Impact

  • A valid account owner can pin a directory record far beyond the intended TTL.
  • A stale or malicious node endpoint can remain discoverable long after normal expiry.
  • Later normal-timestamp updates may be ignored because Register rejects timestamps lower than the stored future timestamp.
  • Service discovery can route traffic toward stale or attacker-controlled infrastructure.

The exact security impact depends on how directory records are consumed by discovery and connection code. This report does not claim unauthorized account impersonation: the registration remains signed by the account key. The confirmed issue is TTL bypass and stale-record pinning.

Recommended Fix

  1. Reject timestamps too far in the future, for example:
if reg.Timestamp > time.Now().Add(MaxRegistrationClockSkew).UnixNano() {
    return fmt.Errorf("timestamp too far in future")
}
  1. Use a bounded clock-skew window, such as 5 minutes, based on network requirements.
  2. Treat future timestamps as invalid in Lookup, List, and Prune instead of treating negative age as fresh.
  3. Add regression tests for timestamps in the future and for replacement after expiry.

Evidence Files

  • evidence/future_timestamp_security_test.go.txt
  • evidence/future_timestamp_test-output.log

No live exploit, public-node probing, or destructive action was performed.

Thread

arturbarszcz782026-10-30 14:46 UTCgithub

[comment from a blocked account removed]

XE deskteam2026-11-14 22:49 UTCgithub

Thanks for the report. We read it against the code and could not confirm a bug in what it describes.

This report is closed as invalid. If we have missed something, file a new report that links https://bounty.xe.network/XE-0132 and says what; it is read like any other.