支持本站 — 捐款将帮助我们持续运营

目标:1000 元,已筹:736

73.6%
一、 漏洞 CVE-2026-22820 基础信息
漏洞信息
                                        # Outray CLI 隧道创建竞态漏洞

## 概述
Outray 是一个开源的 ngrok 替代工具。在版本 0.1.5 之前,存在一个 TOCTOU(检查-执行时间)竞争条件漏洞,可被利用以绕过订阅计划中对活跃隧道数量的限制。

## 影响版本
版本 0.1.5 之前的版本(即 < 0.1.5)

## 细节
该漏洞属于 TOCTOU 类型,攻击者可在检查允许的隧道数量与实际创建隧道之间的时间窗口内,通过竞争条件多次请求创建隧道,从而突破订阅计划设定的并发隧道数限制。

## 影响
未经许可提升服务使用权限,导致用户可创建超出其订阅计划允许数量的活跃隧道,可能导致资源滥用和服务不公平使用。
                                        
神龙判断

是否为 Web 类漏洞: 未知

判断理由:

N/A
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
Outray cli is vulnerable to race conditions in tunnels creation
来源:美国国家漏洞数据库 NVD
漏洞描述信息
Outray openSource ngrok alternative. Prior to 0.1.5, a TOCTOU race condition vulnerability allows a user to exceed the set number of active tunnels in their subscription plan. This vulnerability is fixed in 0.1.5.
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
检查时间与使用时间(TOCTOU)的竞争条件
来源:美国国家漏洞数据库 NVD
漏洞标题
Outray 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Outray是OutRay开源的一个本地服务器搭建工具。 Outray 0.1.5之前版本存在安全漏洞,该漏洞源于TOCTOU竞争条件,可能导致用户超出订阅计划设置的活跃隧道数量。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
其他
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2026-22820 的公开POC
#POC 描述源链接神龙链接
三、漏洞 CVE-2026-22820 的情报信息
  • 标题: Outray cli is vulnerable to race conditions in tunnels creation · Advisory · outray-tunnel/outray · GitHub -- 🔗来源链接

    标签:x_refsource_CONFIRM

    神龙速读:
                                            - **Vulnerability Details**
      - **CVE ID**: CVE-2026-22820
      - **Severity**: Moderate
      - **Affected Package**: Outray (npm)
      - **Affected Versions**: 0.1.3
      - **Patched Versions**: None
      - **Weakness**: CWE-367 (Time-of-check to time-of-use (TOCTOU) race condition)
    
    - **Summary**:
      A TOCTOU race condition vulnerability in the `/tunnel/register` endpoint allows a user to exceed the set number of active tunnels in their subscription plan.
    
    - **Description**:
      - The `/tunnel/register` endpoint code does not properly handle race conditions.
      - The code checks if the tunnel exists in the database and verifies if the limit is exceeded.
      - If limits are exceeded, a tunnel limit error is returned.
      - However, if the limit is not exceeded, a new tunnel is registered without locking transactions from other requests.
      - Parallel requests by the `wshandler` can lead to a race condition, allowing a user to bypass the limit.
    
    - **Proof of Concept (PoC)**:
      A bash script is provided that uses `tmux` to run the `outray` binary in the same tmux window, opening 4 tunnels.
    
    - **Impact**:
      Exploiting the TOCTOU race condition bypasses the intended limit, consuming server resources without additional billing charges.
    
    - **Credits**:
      - **Reporter**: gr33pp
      - **Analyst**: SENSEiXENUS
                                            
    Outray cli is vulnerable to race conditions in tunnels creation · Advisory · outray-tunnel/outray · GitHub
  • 标题: fix(tunnel): add transaction locking to prevent race conditions durin… · outray-tunnel/outray@08c6149 · GitHub -- 🔗来源链接

    标签:x_refsource_MISC

    神龙速读:
                                            从这个网页截图中可以获取到以下关于漏洞的关键信息:
    
    ### 漏洞类型
    - **竞态条件(Race Condition)**
      - 代码在注册隧道时未使用事务锁定,可能会导致并发请求导致的问题。
    
    ### 修复措施
    1. **引入事务锁定**
       - 通过引入 `drizzle-orm` 的 `sql` 模块来支持事务。
       - 使用事务中的 `row-level locking` 来防止并发请求引发的竞态条件。
    
    2. **修改数据库查询**
       - 在数据库查询中使用 `row-level locking` 来确保同一事务内的操作一致性。
       - 添加 `.for("update")` 到查询中,以保证并发请求不会导致重复注册。
    
    3. **验证隧道限制**
       - 移动隧道限制验证,将其放入事务内,确保检查和更新操作在整个事务中保持一致。
    
    4. **错误处理**
       - 重构错误处理逻辑,将错误对象放在事务提交后返回,而不是直接在 JSON 响应中返回。
       - 防止并发注册的竞态条件,避免多个并发注册可能超出隧道限制。
    
    ### 相关文件与更改
    - **文件**:`apps/web/src/routes/api/tunnel/register.ts`
    - **更改内容**:
      - 增加了对数据库事务和行级锁定的支持。
      - 修改了隧道订阅和检查逻辑,确保在事务中进行并发请求的处理。
      - 更新了隧道限制验证的位置和实现方式,确保一致性。
    
    这次的代码变更主要是为了解决在隧道注册过程中可能发生竞态条件所导致的数据一致性问题,通过使用事务锁定和行级锁定机制,有效避免了并发请求带来的同步问题。
                                            
    fix(tunnel): add transaction locking to prevent race conditions durin… · outray-tunnel/outray@08c6149 · GitHub
  • https://nvd.nist.gov/vuln/detail/CVE-2026-22820
四、漏洞 CVE-2026-22820 的评论
匿名用户
2026-01-15 06:08:13

Zaproxy alias impedit expedita quisquam pariatur exercitationem. Nemo rerum eveniet dolores rem quia dignissimos.


发表评论