← Back to AI Insights
Gemini Executive Synthesis

Public network authentication for dsh-pocket, specifically its vulnerability to PIN brute-force and the broader security posture of exposing DeepSeek Harness (DSH) to the internet.

Technical Positioning
Establishing dsh-pocket as a robust, secure gateway for DSH, moving from a weak single-factor PIN authentication with bypassable rate limits to a multi-factor, device-credential-based system with a unified, secure entry point. The goal is to provide a strong, built-in defense against remote code execution, shifting security responsibility from the user to the plugin.
SaaS Insight & Market Implications
This issue exposes critical security vulnerabilities in dsh-pocket, which currently serves as the sole public-facing defense for an unauthenticated DeepSeek Harness (DSH) core. The existing 'URL + 8-digit PIN' single-factor authentication is fundamentally flawed, featuring bypassable rate limits on non-POST endpoints, allowing for unlimited brute-force attacks on a weak 8-digit PIN within days. This directly facilitates remote code execution on host machines. The proposed solution is a necessary architectural overhaul, shifting to a multi-factor authentication model incorporating device credentials, per-device passwords, and local approval via a unified, fixed-domain tunnel. This re-establishes dsh-pocket as a secure gateway, mitigating severe RCE risks and addressing the current negligence in security responsibility. Failure to implement this makes dsh-pocket a liability, not a solution, for public DSH exposure.
Proprietary Technical Taxonomy
PIN 穷举通道 单因子模型 远程代码执行 限速可被完全绕开 固定域名命名隧道 浏览器设备凭据 每设备独立密码 本机批准

Raw Developer Origin & Technical Request

Source Icon GitHub Issue Sep 1, 2026
Repo: shaobeichen/dsh-pocket
【提议】公网入口认证重构:修复可被完全绕开的 PIN 穷举通道,收敛为唯一固定域名 + 「设备凭据+每设备密码+本机批准」(附完整参考实现)

当前 dsh-pocket 的公网认证是「URL+8 位 PIN」单因子模型,且登录限速**只覆盖 POST 登录端点**:`?token=` 与 WebSocket 路径的失败尝试不计数、不锁定,攻击者可以无限速穷举默认 PIN(空间 9×10⁷,约 2~10 天)。而 dsh-pocket 挡在无任何鉴权、可执行任意代码的 DSH 本体前面——被突破的后果是远程代码执行,相当于裸奔。

本 issue 提出重构方案:以固定域名命名隧道为**唯一入口**,用「浏览器设备凭据+每设备独立密码+电脑本机批准」替换 PIN 单因子,移除 LAN / Quick Tunnel / 无认证 CLI 等多余入口。完整实现已在 fork 完成(80 项自动测试+荣耀 50 真实链路验收),先对齐设计,确认后拆成小 PR 分批提交。

## 1. 背景:dsh-pocket 是 DSH 暴露公网时的唯一防线

前几天在知乎看到个讨论,奇安信威胁情报中心披露了 DSH 本体的未授权远程代码执行漏洞(QVD-2026-57410,CVSS 9.8;[知乎讨论](zhihu.com/question/20753723... web 只有防浏览器语境攻击的 Host 头检查,没有真正的身份验证层,端口一旦公网可达即可未授权执行任意命令。社区的高赞结论是「受影响的是把 DSH 暴露到公网的人,暴露前请自备 nginx 反代+鉴权+HTTPS」。

dsh-pocket 恰恰就是「把 DSH 暴露到公网」的插件——它挡在无鉴权的 DSH 前面,是唯一防线;一旦失守,后果是宿主机上的远程代码执行。#13、#40 已经指出了「URL 即钥匙」和弱口令问题,但当前实现仍把安全责任留给使用者的网络防护意识。本提案把这道防线做进插件本身。

## 2. 现状攻击面(基于 main@8fc6bce,v2.10.0)

`#40` 之后实现的三层限速(单 IP 60 秒 5 次失败锁 60 秒;全局 1 分钟 50 次失败锁 30 秒)**对登录端点本身是有效的**,公网判定 fail-closed(#66)也属实。但以下结构性问题仍然存在:

1. **限速可被完全绕开,存在无限穷举通道(最严重)**:`record(ip)` 只在 `POST /pocket-login` 分支调用(`lib/proxy.mjs:525` 附近)。而认证检查 `authCheck` 对所有请求生效,其中 `?token=` 比对失败(`proxy.mjs:322`)**不计数、不锁定**;WebSocket 握手的 token 校验(`proxy.mjs:503-506/698-699`)同样不限速。攻击者可以全速发送 `GET /?token=` 无限穷举。
2. **默认 PIN 可在数天内穷举**:PIN 由 `Math.random()` 生成(非 CSPRNG,`lib/index.js:68-70`),8 位纯数字、无前导零,实际空间 **9×10⁷**。走隧道以 100~500 req/s 枚举,约 2~10 天穷举完毕;有分布式肉鸡更快。
3. **`?token=` 进 URL**:这是正式功能(扫码直达/分享)。PIN 因此进入浏览器历史、聊天转发记录、Cloudflare/服务器访问日志、截图——单因子模型下,PIN 泄露即完全沦陷。
4. **明文存储与非 timing-safe 比...

Developer Debate & Comments

No active discussions extracted for this entry yet.

Adjacent Repository Pain Points

Other highly discussed features and pain points extracted from shaobeichen/dsh-pocket.

Extracted Positioning
Connectivity and access control for dsh-pocket, specifically encountering 'forbidden' errors.
Ensuring reliable and authorized access to dsh-pocket and the underlying DSH service. The goal is to provide a stable connection experience, where 'forbidden' errors are either correctly handled, clearly explained, or eliminated through proper configuration and authentication.
Extracted Positioning
Mobile UI/UX for the DSH chat page within dsh-pocket, specifically addressing information density and usability issues.
Optimizing dsh-pocket for a seamless and functional mobile experience, ensuring core chat functionality and readability are prioritized over desktop-centric data displays. The goal is to deliver a usable mobile interface that supports the 'put DeepSeek Harness in your pocket' value proposition.

Frequently Asked Questions

Market intelligence mapped to Public network authentication for dsh-pocket, specifically its vulnerability to PIN brute-force and the broader security posture of exposing DeepSeek Harness (DSH) to the internet..

What is the technical positioning of Public network authentication for dsh-pocket, specifically its vulnerability to PIN brute-force and the broader security posture of exposing DeepSeek Harness (DSH) to the internet.?
Based on our AI analysis of the original developer request, its primary technical positioning is: Establishing dsh-pocket as a robust, secure gateway for DSH, moving from a weak single-factor PIN authentication with bypassable rate limits to a multi-factor, device-credential-based system with a unified, secure entry point. The goal is to provide a strong, built-in defense against remote code execution, shifting security responsibility from the user to the plugin.
What architecture is tied to Public network authentication for dsh-pocket, specifically its vulnerability to PIN brute-force and the broader security posture of exposing DeepSeek Harness (DSH) to the internet.?
Our proprietary extraction maps Public network authentication for dsh-pocket, specifically its vulnerability to PIN brute-force and the broader security posture of exposing DeepSeek Harness (DSH) to the internet. to adjacent architectural concepts including PIN 穷举通道, 单因子模型, 远程代码执行, 限速可被完全绕开.
Are developers creating tools for Public network authentication for dsh-pocket, specifically its vulnerability to PIN brute-force and the broader security posture of exposing DeepSeek Harness (DSH) to the internet.?
Yes, open-source adoption is correlated. An active project titled 'shaobeichen/dsh-pocket' explores similar frameworks: 把 DeepSeek Harness 装进你的口袋:电脑上跑 dsh web,手机扫码即同步访问(局域网 + 公网,实时同屏)Put DeepSeek Harness in your pocket: run dsh web o...

Engagement Signals

0
Replies
open
Issue Status

Cross-Market Term Frequency

Quantifies the cross-market adoption of foundational terms like 远程代码执行 and fail-closed by tracking occurrence frequency across active SaaS architectures and enterprise developer debates.