DEV Community

jeffrey
jeffrey

Posted on

Part-DB Accepts Protocol-Relative Redirect Targets

Part-DB Accepts Protocol-Relative Redirect Targets

Part-DB before 2.20.6 contains an open redirect in several controllers that accept _redirect or redirect_back parameters. The vendor advisory tracks CVE-2026-136917 and fixed the issue in 2.20.6. The weakness is CWE-601.

The application passed user-controlled values to redirect() without confirming that the target was a local path. Scheme-relative or protocol-relative values can pass a superficial local-path check and send an authenticated victim to another host.

Why an inventory application has this risk

Part-DB is used to manage electronic components and internal records. A user may already be authenticated when following a link to a batch edit, part page or tool controller. An attacker can exploit that existing trust in the domain by using the application as the first step in a phishing chain.

The redirect does not expose a database record by itself. It changes where the browser goes after a trusted site accepts the link. That can support credential theft, malware delivery or a second-stage authorization request.

Update and test

Upgrade to 2.20.6 or later. Test every controller that accepts a return destination with values such as //attacker.example, \\attacker.example, encoded slashes and absolute URLs. The expected behavior is either a local redirect or a rejection before the response is sent.

Search reverse-proxy and application logs for redirect parameters with a network-path scheme, a different host or heavy encoding. Review sessions that reached a login page from a crafted app link and then authenticated.

Safer redirect design

Prefer server-side route names or a short allowlist of local destinations. If the user must provide a path, parse it against the application origin, reject a non-local host and canonicalize the value before building the Location header. Client-side checks alone are not an authorization boundary.

The patch closes these controllers. A shared redirect helper prevents the same pattern from returning when another feature adds a return link.

References

Top comments (0)