Skip to content

Fix for this CVE-2025-47909 is required #204

Open

Description

@satishrayavarapu-cmd

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

No response

Expected Behavior

No response

Steps To Reproduce

No response

Anything else?

No response

Activity

  1. shortontech commented on Nov 9, 2025

    @shortontech

    According to the GitHub advisory, this issue is fixed in tagged release v1.7.3
    gorilla/csrf CSRF vulnerability due to broken Referer validation

    It's also in the changelog for the tag here

  2. stevenh commented on Dec 17, 2025

    @stevenh

    I don't believe thats the case:

    Hosts listed in TrustedOrigins implicitly allow requests from the corresponding HTTP origins, allowing network MitMs to perform CSRF attacks.

    After the GHSA-rq77-p4h8-4crw fix, a network attacker that places a form at http://example.com/ can't get it to submit to https://example.com/ because the Origin header is checked with sameOrigin against a synthetic URL.

    However, if a host is added to TrustedOrigins, both its HTTP and HTTPS origins will be allowed, because the schema of the synthetic URL is ignored and only the host is checked. For example, if an application is hosted on https://example.com/ and adds example.net to TrustedOrigins, a network attacker can serve a form at http://example.net/ to perform the attack.

    Applications should migrate to net/http.CrossOriginProtection, introduced in Go 1.25. If that is not an option, a backport is available as a module at filippo.io/csrf, and a drop-in replacement for the github.com/gorilla/csrf API is available at filippo.io/csrf/gorilla.

    Affected versions: <= 1.7.3

  3. stevenh commented on Dec 17, 2025

    @stevenh

    Also still flagged on pkg.go.dev
    GO-2025-3884: Improper validation of TrustedOrigins allows CSRF attacks in github.com/gorilla/csrf

  4. hazcod commented on Dec 31, 2025

    @hazcod

    Can we update the github advisory then to not have v1.7.3 affected?

  5. stevenh commented on Jan 4, 2026

    @stevenh

    Can we update the github advisory then to not have v1.7.3 affected?

    Have you proved its not effected?

  6. hazcod commented on Jan 4, 2026

    @hazcod

    Can we update the github advisory then to not have v1.7.3 affected?

    Have you proved its not effected?

    https://github.com/gorilla/csrf/releases/tag/v1.7.3 ?

  7. stevenh commented on Jan 5, 2026

    @stevenh

    That's a different CVE: CVE-2025-24358

  8. rayjanoka commented on Jan 26, 2026

    @rayjanoka

    replacement at https://github.com/FiloSottile/csrf

    The new library uses modern browser headers (Sec-Fetch-Site, Origin) instead of tokens, simplifying the codebase by removing all CSRF token handling from templates and JavaScript.

    How filippo.io/csrf handles older browsers:

    1. Modern browsers (2023+): Sec-Fetch-Site header - explicitly says "same-origin" vs "cross-site"
    2. Older browsers (2012-2023): Falls back to Origin header comparison (supported since Chrome 4, Firefox 4, Safari 5, IE 10)
    3. Very old browsers (no headers): Requests are BLOCKED, not allowed through
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions