Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

aws/aws-php-sns-message-validator
master @ 01f1049
3
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Cryptographic Issues: 1 prior fix. Scrutinize any change in this area.
src/MessageValidator.php: most-fixed (2 issues). Treat as high-risk during review.
3 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Signature Bypass: Using loose comparison operations on the return value of openssl_verify allowed error states (returning -1) to be interpreted as successful verifications, completely bypassing message authenticity checks. Ensure strict integer comparison (=== 1) is used.
SSRF: Unintended SSRF occurs when default AWS SNS domain patterns are automatically merged and trusted even if a developer configures a custom, restricted host allowlist, allowing arbitrary SNS endpoints to fetch remote files.
Cryptographic Issues: Accepting arbitrary or unsupported signature versions could allow attackers to downgrade or spoof signatures if the validator does not explicitly restrict execution to trusted signature versions (e.g., SignatureVersion 1).