You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: allow only HTTP(S) URLs in registrations #115
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.
Activity
fix: reject surrogates and bad escapes in URLs
fix: reject surrogates in all service strings
fix: allow only HTTP(S) URLs in registrations (#118)