@fastify/oauth2 由于重复使用 Oauth2 状态而容易受到跨站点请求伪造的影响 (CVE-2023-35935)
CVE编号
CVE-2023-35935利用情况
暂无补丁情况
N/A披露时间
2023-07-04漏洞描述
@fastify/oauth2, a wrapper around the `simple-oauth2` library, is vulnerable to cross site request forgery (CSRF) prior to version 7.2.0.. All versions of @fastify/oauth2 used a statically generated `state` parameter at startup time and were used across all requests for all users. The purpose of the Oauth2 `state` parameter is to prevent CSRF attacks. As such, it should be unique per user and should be connected to the user's session in some way that will allow the server to validate it. Version 7.2.0 changes the default behavior to store the `state` in a cookie with the `http-only` and `same-site=lax` attributes set. The state is now by default generated for every user. Note that this contains a breaking change in the `checkStateFunction` function, which now accepts the full `Request` object. There are no known workarounds for the issue.解决建议
建议您更新当前系统或软件至最新版,完成漏洞的修复。
参考链接 |
---|
- 攻击路径 N/A
- 攻击复杂度 N/A
- 权限要求 N/A
- 影响范围 N/A
- 用户交互 N/A
- 可用性 N/A
- 保密性 N/A
- 完整性 N/A
CWE-ID | 漏洞类型 |
CWE-352 | 跨站请求伪造(CSRF) |
Exp相关链接

版权声明
本站原创文章转载请注明文章出处及链接,谢谢合作!
评论