In the development of DeepSeek Harness (DSH), while leveraging plugins to extend functionality, you must guard against risks such as arbitrary code execution in the configuration loader and HTTP Host header spoofing. This plugin aims to enforce defense-in-depth at the Cordis plugin layer through runtime method shadowing and interception, without modifying the original source code.
This is a DSH runtime security guard plugin maintained by ruanhaodong-tt. It does not modify the original source code; instead, it replicates the fix semantics of DSH Security Patch through runtime method shadowing and HTTP request interception. The plugin is released under the MIT License.
Core Features¶
The plugin primarily covers the following two security scenarios:
- Loader Import Restrictions: Shadows
ctx.loader.import. It validates built-in modules, restricts relative imports, and rejects bare specifiers that resemble paths. This covers CVE QVD-2026-52631. - HTTP Host Header Validation: Uses
prependListeneronhttp.Server. It rejects spoofed loopback Host assertions from non-loopback peers. This covers CVE QVD-2026-57410.
Installation and Activation¶
Add the plugin using the official command:
dsh plugin add ruanhaodong-tt/DSH-Security-Patch
Or add it to your cordis.patch.yml. You need two components: one for core loader protection and one for web server protection.
- insert:
- id: dsh-security-core
name: dsh-security-guard/core
inject: [loader]
- id: dsh-security-web
name: dsh-security-guard/web
inject: [webServer]
Typical Usage¶
Configure trustedHosts in cordis.patch.yml to allow access from specific non-loopback hosts:
- insert:
- id: dsh-security-web
name: dsh-security-guard/web
inject: [webServer]
config:
trustedHosts: ["harness.internal:3080"]
After starting DSH, the plugin prints activation information to the log. You can verify that the protections are active by sending a spoofed Host header:
curl -H "Host: localhost:3080" http://<public-ip>:3080/api/
# Should return 403
Use Cases and Notes¶
This plugin is suitable for DSH users who want to mitigate specific vulnerability risks at runtime.
Important Limitations:
* The plugin cannot remediate QVD-2026-52644 and QVD-2026-52646. These fixes reside in VM-internal closures and sandbox context factories, which Cordis plugins cannot access. To obtain complete protection, you must apply source-code patches.
* The plugin was created with AI assistance. It is not an official DeepSeek patch and has not undergone upstream audit. Assess the risks yourself before use.
Conclusion¶
DSH Security Guard provides targeted runtime security protections for DeepSeek Harness. For more details, visit the Plugin Directory or the GitHub Repository.