Description Preview
Overview
The vulnerability (CVE-2023-29019) in @fastify/passport is a session fixation issue (CWE-384) that occurs because the library fails to regenerate session IDs during the authentication process. When a user logs in, the same sessionId used before authentication remains active after successful authentication. This allows attackers to perform session fixation attacks by planting a known sessionId in the victim's browser (through various attack vectors) and waiting for the victim to authenticate. Once authenticated, the attacker can use the known sessionId to access the victim's authenticated session, effectively bypassing authentication controls and impersonating the victim.
Remediation
To address this vulnerability, users should:
- Upgrade to a patched version of @fastify/passport that regenerates sessionId upon successful authentication.
- Apply the patch referenced in commit 43c82c321db58ea3e375dd475de60befbfcf2a11 if upgrading is not immediately possible.
- Implement additional security measures such as:
- Validating user IP addresses during sessions
- Implementing shorter session timeouts
- Adding additional authentication factors for sensitive operations
There are no known workarounds for this vulnerability other than upgrading to a patched version.
References
- Patch: https://github.com/fastify/fastify-passport/commit/43c82c321db58ea3e375dd475de60befbfcf2a11
- Vendor Advisory: https://github.com/fastify/fastify-passport/security/advisories/GHSA-4m3m-ppvx-xgw9
- Technical Description of Session Fixation: https://owasp.org/www-community/attacks/Session_fixation
Industry ExposureMost to leastThis section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.
- Educational ServicesEducational Services: Low
- Accommodation & Food ServicesAccommodation & Food Services: Low
- Administrative, Support, Waste Management & Remediation ServicesAdministrative, Support, Waste Management & Remediation Services: Low
- Agriculture, Forestry Fishing & HuntingAgriculture, Forestry Fishing & Hunting: Low
- Arts, Entertainment & RecreationArts, Entertainment & Recreation: Low
- ConstructionConstruction: Low
- Finance and InsuranceFinance and Insurance: Low
- Health Care & Social AssistanceHealth Care & Social Assistance: Low
- InformationInformation: Low
- Management of Companies & EnterprisesManagement of Companies & Enterprises: Low
- ManufacturingManufacturing: Low
- MiningMining: Low
- Other Services (except Public Administration)Other Services (except Public Administration): Low
- Professional, Scientific, & Technical ServicesProfessional, Scientific, & Technical Services: Low
- Public AdministrationPublic Administration: Low
- Real Estate Rental & LeasingReal Estate Rental & Leasing: Low
- Retail TradeRetail Trade: Low
- Transportation & WarehousingTransportation & Warehousing: Low
- UtilitiesUtilities: Low
- Wholesale TradeWholesale Trade: Low

