Skip to content

fix(dvwa): redirect http to https in ingress - #110

Merged
mykhailo-bright merged 1 commit into
mainfrom
fix/dvwa-ssl-redirect
Nov 24, 2026
Merged

mykhailo-bright merged 1 commit into
mainfrom
fix/dvwa-ssl-redirect

Conversation

@mykhailo-bright

@mykhailo-bright mykhailo-bright commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

This change is required after BrightSec/nexploit#5669 ("follow redirects in OpenDir, Robots and Sitemap probes").

Since #5669 the crawler probes follow one redirect. DVWA's Apache sits behind the TLS-terminating ingress, so its trailing-slash redirect is an absolute http URL:

GET https://<host>/dvwa  ->  301 Location: http://<host>/dvwa/   (Apache thinks it is on port 80)

With nginx.org/ssl-redirect: "False" the ingress served the whole app over plain http, so the crawler followed the downgrade, parsed the http directory listing and built a second, http copy of the site. That duplicated entrypoints and issues and broke the DVWA e2e tests, e.g.:

  • Directory Listing reported on http://<host>/docs/ instead of https://<host>/docs/ (C35211, C35214, C35224)
  • extra Full Path Disclosure on http://<host>/vulnerabilities/captcha/ (C35211)

Confirmed in the crawler logs of scan aGiveqswFARuSAR2ke5Kz6 (C35211): the first http URL in the scan is the OpenDir probe following the redirect above.

What

Set nginx.org/ssl-redirect: "True" for dvwa and dvwa-medium-security and bump the chart versions (0.0.8 -> 0.0.9, 1.0.1 -> 1.0.2).

Alternatives considered

  • Stop following https -> http redirects in the engine: possible, but the engine follows a legitimate in-scope redirect. Typical production setups redirect http to https at the proxy, which is what this change makes DVWA do.

Follow-up

After the chart is released, rerun C35211, C35214, C35224 and the IPM DVWA tests recalibrated in engine-e2e#1515 (C7746, C7747, C7748, C7749, C7784, C8418). Their entrypoint counts are expected to drop and will need recalibration.

Since nexploit#5669 the crawler's OpenDir, Robots and Sitemap probes
follow one redirect. DVWA's Apache sits behind the TLS-terminating
ingress, so its trailing-slash redirect is absolute http
(`https://host/dvwa` -> `http://host/dvwa/`). With `ssl-redirect`
disabled the ingress served the whole app over plain http, and the
crawler built a second, http copy of the site from the listing links.
That duplicated entrypoints and issues and made the DVWA e2e tests
flaky (e.g. Directory Listing reported on `http://host/docs/`, extra
Full Path Disclosure on `http://.../vulnerabilities/captcha/`).

Redirect http to https in the dvwa and dvwa-medium-security ingresses,
as a typical production deployment does, so scans stay on https.
@mykhailo-bright
mykhailo-bright merged commit 9b1d4b7 into main Nov 24, 2026
3 checks passed
@mykhailo-bright
mykhailo-bright deleted the fix/dvwa-ssl-redirect branch November 24, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant