Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 54.9k
    • Issues 54.9k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1.5k
    • Merge requests 1.5k
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #29395
Closed
Open
Issue created Jun 10, 2019 by GitLab SecurityBot@gitlab-securitybotReporter

SSRF possible due to shared address space not being blocked.

HackerOne report #579934 by no1zy on 2019-05-14, assigned to estrike:

Summary

Because /lib/gitlab/url_blocker.rb does not block shared address space, SSRF is possible.

Steps to reproduce

  1. Go to http://{host}/projects/new".
  2. Click to "Repo by URL".
  3. Enter the following in Git repository URL field. http://100.64.0.5:9999/ssrf
  4. Enter other required fields.
  5. Click to "Create project".
GET /ssrf/info/refs?service=git-upload-pack HTTP/1.1  
Host: 100.64.0.5:9999  
User-Agent: git/2.18.1  
Accept: */*  
Accept-Encoding: deflate, gzip  
Pragma: no-cache

  1. If you want to send parameters, specify the URL as follows:
http://100.64.0.5:9999/ssrf?param=true#  
GET /ssrf?param=true HTTP/1.1  
Host: 100.64.0.5:9999  
User-Agent: git/2.18.1  
Accept: */*  
Accept-Encoding: deflate, gzip  
Pragma: no-cache

Impact

The shared address space is used as a private network address by the ISP.
Reference: https://en.wikipedia.org/wiki/IPv4_shared_address_space

This issue affects all actions using /lib/gitlab/url_blocker.rb.

Proposal

To fix this issue, also block the 100.64.0.0/10 netmask.

Edited Oct 11, 2021 by Sean Carroll
Assignee
Assign to
Time tracking