Skip to content

fix(security): block 0.0.0.0/8 range in SSRF protection#3223

Merged
Priyanshu-byte-coder merged 1 commit into
mainfrom
security/block-zeronet-ssrf
Jul 21, 2026
Merged

fix(security): block 0.0.0.0/8 range in SSRF protection#3223
Priyanshu-byte-coder merged 1 commit into
mainfrom
security/block-zeronet-ssrf

Conversation

@Priyanshu-byte-coder

Copy link
Copy Markdown
Owner

The numeric private-range check in isPrivateIP didn't include 0.0.0.0/8. Only the literal hostname "0.0.0.0" was blocked, so a host resolving to any 0.x.x.x address (e.g. 0, which routes to localhost on many systems) could bypass isSafeUrl. Adds 0.0.0.0/8 to PRIVATE_RANGES.

Finding surfaced by #3218 (extracted here as a focused change; that PR bundled 15 workflow files + unrelated UI edits).

The numeric private-range check didn't include 0.0.0.0/8. Only the
literal hostname string "0.0.0.0" was blocked, so a host that resolves
to a 0.x.x.x address (e.g. "0", which routes to localhost on many
systems) could slip through isPrivateIP. Add 0.0.0.0/8 to the blocked
ranges.
@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:security GSSoC type bonus: security (+20 pts) labels Jul 21, 2026
@github-actions github-actions Bot added type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) labels Jul 21, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@Priyanshu-byte-coder
Priyanshu-byte-coder merged commit c80e9d5 into main Jul 21, 2026
17 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Merged! Thanks for contributing to DevTrack.

If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers.

Keep an eye on open issues for your next contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) type:security GSSoC type bonus: security (+20 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant