fiber: Origin Validation Error
CVE-2024-25124 is a critical-severity origin validation error vulnerability in fiber from Gofiber, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists version 2.52.1 as the first without the flaw, so updating fiber to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.66% chance of exploitation within 30 days, higher than 52% of scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Update fiber to 2.52.1 or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 9.4 | Critical | CNA (github.com) |
| CVSS 3.1 | 9.8 | Critical | NVD |
Official description
Fiber is a web framework written in go. Prior to version 2.52.1, the CORS middleware allows for insecure configurations that could potentially expose the application to multiple CORS-related vulnerabilities. Specifically, it allows setting the Access-Control-Allow-Origin header to a wildcard (`*`) while also having the Access-Control-Allow-Credentials set to true, which goes against recommended security best practices. The impact of this misconfiguration is high as it can lead to unauthorized access to sensitive user data and expose the system to various types of attacks listed in the PortSwigger article linked in the references. Version 2.52.1 contains a patch for this issue. As a workaround, users may manually validate the CORS configurations in their implementation to ensure that they do not allow a wildcard origin when credentials are enabled. The browser fetch api, as well as browsers and utilities that enforce CORS policies, are not affected by this.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Origin Validation Error
The product does not properly verify that the source of data or communication is valid.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
Patches and release notes
Technical write-ups (may include proof of concept)
- blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.htmlExploit, Third Party Advisory
Other references
- codeql.github.com/codeql-query-help/javascript/js-cors-misconfiguration-for-credentialsTechnical Description
- developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentialsTechnical Description
- fetch.spec.whatwg.org/#cors-protocol-and-credentialsTechnical Description
Other vulnerabilities in fiber
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 9.4 Critical severity
- 7.5 High severity
- 7.5 High severity
Recent Origin Validation Error vulnerabilities
- 8.8 High severity
- 7.8 High severity
- 8.3 High severity
- 8.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.