GO-2023-2115

Source
https://pkg.go.dev/vuln/GO-2023-2115
Import Source
https://vuln.go.dev/ID/GO-2023-2115.json
JSON Data
https://api.test.osv.dev/v1/vulns/GO-2023-2115
Aliases
Published
2023-10-24T16:57:01Z
Modified
2024-05-20T16:03:47Z
Summary
CSRF token reuse vulnerability in github.com/gofiber/fiber/v2
Details

A cross-site request forgery vulnerability in this package can allow an attacker to inject arbitrary values and forge malicious requests on behalf of a user. The attacker may inject arbitrary values without any authentication, or perform various malicious actions on behalf of an authenticated user, potentially compromising the security and integrity of the application.

The vulnerability is caused by improper validation and enforcement of CSRF tokens within the application. For 'safe' methods, the token is extracted from the cookie and saved to storage without further validation or sanitization. In addition, the CSRF token is validated against tokens in storage but not associated with a session, nor by using a Double Submit Cookie Method, allowing for token reuse.

Database specific
{
    "review_status": "REVIEWED",
    "url": "https://pkg.go.dev/vuln/GO-2023-2115"
}
References

Affected packages

Go / github.com/gofiber/fiber/v2

Package

Name
github.com/gofiber/fiber/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/gofiber/fiber/v2

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.50.0

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/gofiber/fiber/v2/middleware/csrf",
            "symbols": [
                "CsrfFromCookie",
                "CsrfFromForm",
                "CsrfFromHeader",
                "CsrfFromParam",
                "CsrfFromQuery",
                "New",
                "configDefault",
                "manager.getRaw",
                "manager.setRaw",
                "newManager"
            ]
        }
    ]
}