CVE-2025-59351: Dragonfly possibly panics due to nil pointer dereference when using variables created alongside an error

Published Sep 17, 2025
·
Updated

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.

golang 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.

Other sources

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.

MITRE

Affected Software

4 affected componentsFixes available
DragonFly DragonFly<2.1.0
linuxfoundation Dragonfly Go<2.1.0
go/d7y.io/dragonfly/v2<2.1.0
2.1.0
go/github.com/dragonflyoss/dragonfly<2.1.0
2.1.0

Event History

Sep 17, 2025
CVE Published
via MITRE·07:46 PM
Data Sourced
via MITRE·07:46 PM
DescriptionWeakness
Advisory Published
via GitHub·08:10 PM
Data Sourced
via GitHub·08:10 PM
DescriptionWeaknessAffected Software
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-59351?

CVE-2025-59351 has been classified as a critical severity vulnerability due to its potential to cause code to panic from nil dereference.

2

How do I fix CVE-2025-59351?

To fix CVE-2025-59351, upgrade Dragonfly to version 2.1.0 or later where this issue has been resolved.

3

What systems are affected by CVE-2025-59351?

CVE-2025-59351 affects all versions of Dragonfly prior to 2.1.0.

4

What kind of vulnerability is CVE-2025-59351?

CVE-2025-59351 is a nil dereference vulnerability that can lead to application crashes.

5

Can CVE-2025-59351 be exploited remotely?

Yes, CVE-2025-59351 can potentially be exploited by an attacker if they can invoke the vulnerable function in the affected software.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203