Skip to main content

URL Validation & Security

Plugged.in implements multiple layers of URL validation to prevent Server-Side Request Forgery (SSRF) attacks and ensure secure connections to MCP servers.

Overview

Proper URL validation is critical for preventing SSRF attacks that could expose internal resources.
URL validation occurs at multiple levels:
  1. Input Validation: Syntax and format checking
  2. Domain Allowlisting: Approved domains only
  3. IP Range Blocking: Prevent internal network access
  4. Protocol Validation: HTTPS enforcement
  5. Port Restrictions: Limited to safe ports

Validation Layers

1. Input Validation

All URLs are validated using strict patterns:

2. Domain Allowlisting

Only pre-approved domains are allowed for MCP server connections in production.

3. IP Range Blocking

Prevent access to internal networks:

4. Protocol Validation

Enforce secure protocols:

5. Port Restrictions

Limit connections to safe ports:

Implementation

Complete Validation Function

URL Sanitization

Clean and normalize URLs:

Security Headers

Content Security Policy

Prevent XSS and data injection:

Additional Security Headers

SSRF Prevention

Request Interception

Intercept and validate all outgoing requests:

Timeout Protection

Prevent hanging connections:

Testing URL Validation

Unit Tests

Security Testing

Test SSRF prevention:

Configuration

Environment Variables

Runtime Configuration

Best Practices

Never trust user-provided URLs. Always validate before use.
Explicitly allow known-good domains rather than blocking bad ones.
Re-validate URLs after following redirects.
Log all validation failures for security monitoring.
Periodically review and update validation rules.
Use multiple layers of validation, don’t rely on a single check.

Troubleshooting

Common Issues

Support

For security-related questions: