|
| 1 | +--- |
| 2 | +layout: advisory |
| 3 | +title: 'GHSA-prq8-7wvh-44qh (oauth): Cross-origin OAuth token-request redirects can |
| 4 | + expose signed request metadata' |
| 5 | +comments: false |
| 6 | +categories: |
| 7 | +- oauth |
| 8 | +advisory: |
| 9 | + gem: oauth |
| 10 | + ghsa: prq8-7wvh-44qh |
| 11 | + url: https://github.com/ruby-oauth/oauth/security/advisories/GHSA-prq8-7wvh-44qh |
| 12 | + title: Cross-origin OAuth token-request redirects can expose signed request metadata |
| 13 | + date: 2026-06-07 |
| 14 | + description: |- |
| 15 | + ## Summary |
| 16 | +
|
| 17 | + When an application uses OAuth::Consumer to request OAuth 1.0 request |
| 18 | + tokens or access tokens, the token request helper follows 300..399 |
| 19 | + redirects returned by the OAuth server. In affected versions, |
| 20 | + OAuth::Consumer#token_request parses the raw Location header, follows |
| 21 | + the redirect recursively, and can mutate the consumer's configured |
| 22 | + site when the redirect points to a different host with the same path. |
| 23 | +
|
| 24 | + The result is a cross-origin signed-request disclosure primitive: if an OAuth |
| 25 | + server token endpoint returns a redirect whose target an attacker controls, |
| 26 | + the client can re-sign the token request and send OAuth 1.0 request metadata, |
| 27 | + including the OAuth signature, nonce, timestamp, consumer key, and any request |
| 28 | + parameters included in the signature base string, to the attacker-controlled |
| 29 | + host. The same behavior can also be used as an SSRF or confused-deputy |
| 30 | + primitive because the application server follows the redirect and sends |
| 31 | + the next request from its own network position. |
| 32 | +
|
| 33 | + ## Affected |
| 34 | +
|
| 35 | + oauth v1.1.5 and prior versions back to and including v0.5.5. |
| 36 | + The cross-host token redirect behavior was introduced by d74b767f |
| 37 | + The behavior is documented in the v0.5.5 changelog as "Allow redirect to |
| 38 | + different host but same path". |
| 39 | + The vulnerable behavior is in OAuth::Consumer#token_request, which is |
| 40 | + used by the documented request-token and access-token flows. |
| 41 | + The issue is not specific to a Ruby engine or platform. It is caused by the |
| 42 | + gem's redirect handling and recursive token request behavior. |
| 43 | + Patched version: oauth v1.1.6. |
| 44 | +
|
| 45 | + ## Impact |
| 46 | +
|
| 47 | + A consumer that calls OAuth::Consumer#get_request_token, |
| 48 | + OAuth::Consumer#get_access_token, or lower-level token request helpers |
| 49 | + against an OAuth server whose token endpoint redirect target can be |
| 50 | + influenced may lose three security properties: |
| 51 | +
|
| 52 | + Cross-origin signed-request metadata disclosure. The redirected request is |
| 53 | + signed for the attacker-controlled endpoint. Depending on the request method, |
| 54 | + scheme, and parameters, the attacker may receive OAuth 1.0 parameters such as |
| 55 | + oauth_consumer_key, oauth_signature_method, oauth_timestamp, |
| 56 | + oauth_nonce, oauth_version, and oauth_signature. |
| 57 | + SSRF from the application server. The OAuth client follows the redirect on |
| 58 | + behalf of the application, so the redirected host is contacted from the |
| 59 | + application server's network position. |
| 60 | + Confused-deputy behavior. A malicious or compromised token endpoint can |
| 61 | + cause an otherwise trusted application to initiate signed requests to an |
| 62 | + unintended origin. |
| 63 | + The disclosed OAuth 1 signature is not equivalent to an OAuth 2 bearer token: |
| 64 | + it is bound to the signed request, timestamp, nonce, HTTP method, and request |
| 65 | + URL. However, it can still disclose sensitive integration metadata, may be |
| 66 | + replayable within the receiver's accepted nonce/timestamp window in some |
| 67 | + deployments, and can expose application-server reachability to |
| 68 | + attacker-selected hosts. |
| 69 | +
|
| 70 | + ## Credit |
| 71 | +
|
| 72 | + * Found during the follow-up audit for GHSA-pp92-crg2-gfv9. |
| 73 | +
|
| 74 | + * Reporter/coordinator: Peter H. Boling (pboling) |
| 75 | + cvss_v3: 7.2 |
| 76 | + unaffected_versions: |
| 77 | + - "< 0.5.5" |
| 78 | + patched_versions: |
| 79 | + - ">= 1.1.6" |
| 80 | + related: |
| 81 | + url: |
| 82 | + - https://github.com/ruby-oauth/oauth/blob/v1.1.6/CHANGELOG.md |
| 83 | + - https://github.com/ruby-oauth/oauth/releases/tag/v1.1.6 |
| 84 | + - https://github.com/ruby-oauth/oauth/commit/d74b767f |
| 85 | + - https://github.com/ruby-oauth/oauth/security/advisories/GHSA-pp92-crg2-gfv9 |
| 86 | + - https://github.com/ruby-oauth/oauth/security/advisories/GHSA-prq8-7wvh-44qh |
| 87 | + notes: | |
| 88 | + - Not on GHSA. |
| 89 | + - No CVE value - will add it if it shows up. |
| 90 | + - No NVD/[cvss_v2, cvss_v4] values - v3 from GHSA. |
| 91 | +--- |
0 commit comments