2.7low
Dragonfly possibly panics due to nil pointer dereference when using variables created alongside an error
- Severity
- 2.7low CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.31% (higher than 26% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-4mhv-8rh3-4ghwGO-2025-3970
Description
Dragonfly is an open source P2P-based file distribution and image acceleration system. Prior to 2.1.0, the first return value of a function is dereferenced even when the function returns an error. This can result in a nil dereference, and cause code to panic. This vulnerability is fixed in 2.1.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| dragonflyoss dragonfly | < 2.1.0 | CVE List |
| github.com/dragonflyoss/dragonfly (Go) | before 2.1.0, all versions | GitHub Advisory Database, Go Vulnerability Database |
| d7y.io/dragonfly/v2 (Go) | before 2.1.0 | GitHub Advisory Database, Go Vulnerability Database |
| linuxfoundation dragonfly | before 2.1.0 | NVD |
All scores
| GitHub_M | 2.7low CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
Dragonfly is an open source P2P-based file distribution and image acceleration system. Prior to 2.1.0, the first return value of a function is dereferenced even when the function returns an error. This can result in a nil dereference, and cause code to panic. This vulnerability is fixed in 2.1.0.
GitHub Advisory Database
Impact
We found two instances in the DragonFly codebase where the first return value of a function is dereferenced even when the function returns an error (figures 9.1 and 9.2). This can result in a nil dereference, and cause code to panic. The codebase may contain additional instances of the bug.
request, err := source.NewRequestWithContext(ctx, parentReq.Url,
parentReq.UrlMeta.Header)
if err != nil {
log.Errorf("generate url [%v] request error: %v", request.URL, err)
span.RecordError(err)
return err
}
Eve is a malicious actor operating a peer machine. She sends a dfdaemonv1.DownRequest request to her peer Alice. Alice’s machine receives the request, resolves a nil variable in the server.Download method, and panics.
Patches
- Dragonfy v2.1.0 and above.
Workarounds
There are no effective workarounds, beyond upgrading.
References
A third party security audit was performed by Trail of Bits, you can see the full report.
If you have any questions or comments about this advisory, please email us at dragonfly-maintainers@googlegroups.com.
Go Vulnerability Database
DragonFly vulnerable to panics due to nil pointer dereference when using variables created alongside an error in d7y.io/dragonfly
NVD (es)
Dragonfly es un sistema de distribución de archivos y aceleración de imágenes de código abierto basado en P2P. Antes de la 2.1.0, el primer valor de retorno de una función es desreferenciado incluso cuando la función devuelve un error. Esto puede resultar en una desreferenciación nula y provocar un pánico en el código. Esta vulnerabilidad se corrigió en la 2.1.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-59351 changed 2025-09-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4mhv-8rh3-4ghw changed 2025-09-26 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-3970 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2025-59351 changed 2026-06-17 | Public domain |