Skip to content

generateIdempotencyKey falls back to Math.random on non-secure origins #706

Closed

Description

@chonilius

Problem

When crypto.randomUUID is missing, which happens on any non-secure context such as a plain-http staging deploy (not just "very unlikely browsers"), keys are built from Math.random(). Those are predictable and collision-prone, and since keys are scoped per caller on the backend, a collision replays someone's cached response instead of executing.

Suggested fix

Fall back to crypto.getRandomValues (available on insecure origins) to build a v4 UUID.

Related: #6

Activity

  1. added
    securitySecurity-related issue
    Stellar WaveIssues in the Stellar wave program
    and removed
    Stellar WaveIssues in the Stellar wave program
    on Oct 13, 2026
  2. zane1502 commented on Oct 17, 2026

    @zane1502
    Contributor

    @zane1502 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi, I would love to work on this

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @zane1502 to this issue.

  3. drips-wave commented on Oct 17, 2026

    @drips-wave

    Congratulations, @zane1502! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @zane1502: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  4. grantfox-oss commented on Oct 17, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @zane1502's PR #805 was approved and merged by @chonilius.

    🏆 @zane1502: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (634 total points). Track your full progress on GrantFox.

    👏 Great work, @zane1502! Keep contributing to MergeFi.

  5. drips-wave commented on Oct 17, 2026

    @drips-wave

    This issue has been completed by @zane1502 as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @zane1502: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programgood first issueGood for newcomerssecuritySecurity-related issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions