CVE-2017-9785 — Nancy
CRITICALCVE-2017-9785 is a critical-severity (CVSS 9.8) Deserialization of Untrusted Data vulnerability in Nancy. A fix is available for Nancy — see the affected versions and patch details below.
Deserialization of Untrusted Data in NancyFX Nancy
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
Nancy.NETNancyReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects NuGet packages — download data is not available via public APIs for these ecosystems.
Description
Csrf.cs in NancyFX Nancy before 1.4.4 and 2.x before 2.0-dangermouse has Remote Code Execution via Deserialization of JSON data in a CSRF Cookie.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| .NETNuGet | Nancy | all versions | 1.4.4dotnet add package Nancy --version 1.4.4 |
| .NETNuGet | Nancy | ≥ 2.0.0-alpha&&< 2.0.0 | 2.0.0dotnet add package Nancy --version 2.0.0 |
Affected Products
nancynancyfxDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for Nancy, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update Nancy to 1.4.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2017-9785 is resolved across your whole dependency graph.
Workarounds
Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.
Frequently Asked Questions
Is CVE-2017-9785 in your dependencies?
Find it across NuGet, including transitive dependencies.