Skip to content

fix: allow only HTTP(S) URLs in registrations #115

Closed

Description

@uniqueg

Found in the pre-release review of dev at 98771b3 (before v0.3.0).

Problem

  • normalize_url (cloud_registry/ga4gh/registry/service.py) only requires a scheme and a host, so service URLs with schemes such as javascript: or file: are accepted.
  • contactUrl, documentationUrl and organization.url are declared with format: uri, but jsonschema only checks that format when an optional validator package (rfc3987 or rfc3986-validator) is installed. Neither is a dependency, so any string is accepted.
  • These values are served on the public endpoints (GET /services, GET /services/{serviceId}, GET /verifications).

Impact

Any authenticated user can register links that run scripts in clients that render them as links (e.g. a registry UI), or that point clients fetching {url}/service-info to internal addresses (SSRF in those clients).

Proposed fix

  • Allow only http and https for url, contactUrl, documentationUrl and organization.url (400 otherwise), with tests.
  • Install a uri format validator, or check these fields explicitly in the controller.
  • Document that clients should treat registry content as untrusted.
  • Optional, discuss: reject loopback, link-local and private addresses unless configured otherwise.

Activity

  1. added a commit that references this issue on Oct 21, 2026
    36adf9a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions