generated from host-uk/core-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
lang:phpPHP/LaravelPHP/Laravel
Description
Description
The Server model accepts any string for the 'ip' field without validation for valid IP addresses or hostnames.
Location
- File: src/View/Modal/Admin/Servers.php (validation rules, lines 87-92)
- File: src/Models/Server.php (fillable, line 49)
Issue
The validation rules only check:
- ip => required|string|max:255
This allows:
- Internal/private IP addresses (127.0.0.1, 10.x.x.x, 192.168.x.x)
- Cloud metadata endpoints (169.254.169.254)
- Local hostnames that resolve to internal services
- Malformed input that could cause issues
This could enable SSRF attacks if the SSH connection is used to probe internal infrastructure.
Recommendation
- Add IP/hostname validation (ip or domain format)
- Block connections to private IP ranges and localhost
- Block connections to cloud metadata endpoints
- Consider allowlisting specific IP ranges or requiring domain verification
- Validate DNS resolution before saving
Severity
Medium - Could enable internal network scanning via SSRF
Metadata
Metadata
Assignees
Labels
lang:phpPHP/LaravelPHP/Laravel