How One OIDC URL Turned Into a Much Bigger SSRF
An authenticated admin panel allowed configuration of OIDC URLs that the backend fetched, with inconsistent SSRF protections across fields. An attacker could bypass private-IP validation via redirects or use a field lacking validation to make the server request internal resources, and in some cases reflect response bodies back.
Cybersecurity
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
The target was an authenticated administration panel that let administrators configure an external OIDC identity provider. The configuration form contained the fields you would expect for such an integration:
authorization_url
token_url
userinfo_url
jwks_url
client_id
client_secret
The researcher was not hunting SSRF specifically. The starting question was simpler: which of these URLs does the backend actually request? There is a large security difference between a browser storing a URL and using it later, and an application server fetching a URL supplied by a user. The second case is where SSRF begins.

Setup
The target was an authenticated administration panel that allowed administrators to configure an external OIDC identity provider. Two pieces of infrastructure were used: a server the researcher controlled, to observe inbound requests, and later a small mock OIDC provider on infrastructure the researcher controlled. The mock provider served /authorize, /token, /jwks and /userinfo, used a signing key generated by the researcher, published the public key through JWKS, and returned properly signed tokens.
No specific product, version or account role beyond administrator is named in the report.
Finding it
The first test was the JWKS URL. Instead of a real JWKS endpoint, the researcher supplied a server under their control and saved the configuration. A few seconds later an HTTP request arrived. It did not come from the browser; it came from the application's infrastructure. The flow was effectively:
Administrator
|
| saves OIDC configuration
v
Application backend
|
| GET
v
Attacker-controlled server
That established a server-side request primitive, but on its own it is not necessarily interesting: plenty of applications intentionally fetch remote configuration. The important question was whether the destination could be controlled.
Exploitation
Step 1: test the obvious internal destinations
The JWKS URL was changed to a loopback or private destination. The application rejected it with an error similar to:
URL cannot reference private, loopback, or link-local addresses
Alternative representations of IP addresses were also tried, rather than only a normal dotted address, and the application still detected them. This suggested the hostname was being resolved before validation, not merely string-matched against [redacted]. At that point the path looked properly protected.
Step 2: test redirects
The next question was when validation happened. If the application validates a URL and then hands it to an HTTP client that follows redirects, the validator only ever sees the first hop. The researcher tested a direct internal destination:
jwks_url = https://<internal-address>/
Result:
Blocked: private destination
Then a public redirector pointing at the same internal destination:
jwks_url = https://<public-redirector>/?url=https://<internal-address>/
This time the error was completely different:
Couldn
The difference mattered. The direct request was rejected before any connection attempt. The redirected request passed validation and later failed while connecting to the final host. Same destination, different path. The differential was:
DIRECT
public validation -> internal IP detected -> BLOCK
REDIRECT
public validation -> public IP accepted
-> HTTP 302
-> internal IP
-> connection attempted
The application was validating the first URL but trusting the HTTP client after that. That was the first SSRF bypass.
Step 3: test each OIDC URL field independently
Once it was clear the OIDC implementation made server-side requests, the four URL fields were no longer treated as one feature. They look similar in the UI, but backend applications frequently handle them through different code paths. Each field was tested on its own, and that turned out to be important.
The JWKS field had:
HTTPS-only validation
private-IP validation
Another OIDC URL field accepted something equivalent to:
http:
and saved it successfully. No HTTPS requirement, no private-address rejection, and no redirect bypass was even necessary. The model of the vulnerability changed from one badly implemented SSRF filter to multiple server-side URL consumers with inconsistent security controls. Conceptually the application looked something like this:
OIDC configuration
|
+---------------+---------------+
| | |
JWKS URL Token URL UserInfo URL
| | |
validation weak/no weak/no
+ HTTPS validation validation
|
server fetch
Two fields living next to each other in the same JSON object do not mean they use the same backend library or validator.
Step 4: trigger the stored URLs at runtime
Storing an internal URL is not the same as triggering it. OIDC URLs such as token_url and userinfo_url normally are not requested while saving configuration; they are requested later during authentication. A way was needed to drive the OAuth/OIDC flow using only the researcher's own test setup.
After mapping the login flows, the researcher found a secondary authentication entry point that used the configuration under their control. A small mock OIDC provider was built on controlled infrastructure, serving:
/.well-known/openid-configuration
/authorize
/token
/jwks
/userinfo
The researcher generated a signing key, served the public key through JWKS, and returned properly signed tokens. Then the application's login flow was initiated. The server logs started receiving requests, in roughly this sequence:
Browser
|
| starts login
v
Application
|
+------> attacker /authorize
|
+------> attacker /token
|
+------> attacker /jwks
|
+------> attacker /userinfo
The last three requests were performed by the application server. That was runtime confirmation that the URLs were not merely stored configuration: they became network destinations used by the backend.
Step 5: turn blind SSRF into a response channel
Making a server connect to an internal address is useful; retrieving the response is more interesting. The userinfo request offered a path. In a normal OIDC flow the identity provider might return something like:
{
"sub": "12345",
"email": "[redacted]",
"name": "Example User"
}
The application fetches that JSON and converts it into identity claims, so the data flow is:
Configured URL
|
v
Server-side HTTP request
|
v
HTTP response body
|
v
OIDC claim parser
|
v
Application
That is a very different primitive from a port scan, because the response is actually consumed by the application. To prove the data path safely, the researcher's own /userinfo endpoint returned distinctive canaries:
{
"sub": "researcher-test",
"name": "SSRF_RESPONSE_CANARY",
"custom_marker": "CONTROLLED_TEST_VALUE"
}
The application processed them as identity claims, demonstrating:
attacker-selected server
->
backend fetch
->
attacker-selected response
->
application data processing
The researcher deliberately did not try to extract sensitive production information from internal services. The goal was to prove the primitive with controlled data and to understand what would happen if an internal HTTP service returned compatible content.
Step 6: a second sink with response reflection
While mapping other places where administrators could supply network destinations, the researcher found another integration feature. This one contacted an external API when its configuration was saved. It was pointed at controlled infrastructure and the server connected. This sink had an additional behaviour: the application forwarded an authentication header whose value was partially controlled by the configuration. Conceptually:
GET /some/fixed/path HTTP/1.1
Host: attacker.example
Authorization: <attacker-controlled-value>
More importantly, certain HTTP errors from the remote server were returned inside the application's own API error response. The researcher tested with a unique canary body:
SSRF_RESPONSE_BODY_CANARY_93A7
The controlled server returned:
HTTP/1.1 404 Not Found
Content-Type: text/plain
SSRF_RESPONSE_BODY_CANARY_93A7
The application's API response then contained:
SSRF_RESPONSE_BODY_CANARY_93A7
That was a clean response-body reflection primitive. The chain was now:
Attacker
|
| supplies URL
v
Application backend
|
| GET internal/remote destination
v
Target service
|
| response body
v
Application backend
|
| error message
v
Attacker
This was much stronger evidence than a timeout alone. Both sides were controlled, and a marker made the complete round trip.
Step 7: use errors as a network oracle
Throughout the hunt, application errors were treated as network observations. Three destinations might produce:
A -> connection refused
B -> request timed out
C -> HTTP 401
Those are not just errors; they reveal different states:
Connection refused
-> host reachable, port likely closed/rejecting
Timeout
-> filtered, blackholed, or service not responding
HTTP 401
-> TCP connection succeeded
-> HTTP service responded
This creates a small internal network oracle. A handful of controlled tests were enough to prove the server could distinguish internal network states, without aggressive scanning. The same distinction was useful for the redirect bypass: a direct internal URL returned "private address prohibited", while a public URL that returned a 302 to the same internal URL produced "connection timed out". The second error only makes sense if execution got past the original URL validation and reached the networking layer.
Step 8: revise the report as evidence grew
The first version of the report was deliberately conservative. At that stage it proved:
server-side request
+private-IP protection bypass
+internal connection attempt
The interesting runtime path had not yet been proved, so the impact was framed around authenticated SSRF rather than hypothetical credential theft or internal compromise. After the login flow that triggered the OIDC requests was found, the story changed: the attacker-controlled URLs were used at runtime and returned data entered the application's identity-processing pipeline. The separate response-reflection sink strengthened the case further. The lesson drawn was not to inflate the first result but to improve the evidence: a claim that the bug could read AWS credentials and lead to RCE is weak without demonstration, whereas a request leaving the backend, a direct-versus-redirect differential, a controlled response and the same canary appearing in the application are much harder to argue with.
Root cause
The application had multiple ways to turn configuration data into outbound server requests, but the SSRF policy was not centralised. Different features used different HTTP clients and different validation. One field enforced HTTPS and rejected private addresses, but validated only the URL as supplied, so a redirect to an internal address was followed by the HTTP client without revalidation. Another field accepted http: and saved a private destination with no equivalent checks. The runtime OIDC fetches then consumed attacker-selected responses as identity claims, and a separate integration sink reflected upstream response bodies inside application error messages. The defences were inconsistent across fields, and one field validated only the URL as supplied, so a redirect was followed without revalidation.
Impact
An authenticated administrator could make the application server issue requests to destinations of their choosing, including internal addresses, and in some paths receive the response back. The report demonstrates: a private-IP validation bypass through redirects, a field with no equivalent validation that accepted a direct internal destination, runtime OAuth/OIDC fetches whose responses were consumed as identity claims, an integration fetch that reflected the response body in an application error, and a proxy verification feature that acted as an internal connectivity and status oracle. The researcher did not attempt to extract sensitive production data from internal services, so the impact beyond the demonstrated primitives is not established in the report. The runtime path relied on a secondary authentication entry point that used the controlled configuration.
Fix
Because the issue existed across multiple fetch paths, a simple string blacklist would not have solved it. The protections the researcher describes as important are architectural:
1. Parse the URL.
2. Allow only expected schemes.
3. Resolve the hostname.
4. Reject loopback, private, link-local, multicast,
and other prohibited ranges.
5. Connect only to the validated address.
6. If redirects are allowed:
validate EVERY redirect destination again.
7. Consider disabling redirects entirely where they
provide no legitimate functionality.
8. Apply the same URL policy to every backend HTTP client.
9. Don't return arbitrary upstream response bodies
inside application errors.
The redirect rule deserves emphasis. This is unsafe:
validate(initial_url)
http_client.get(initial_url, follow_redirects=True)
A safer model is:
url = initial_url
for redirect in allowed_redirects:
destination = resolve_and_validate(url)
response = request(destination)
if not response.is_redirect:
return response
url = response.location
raise TooManyRedirects()
Validation has to follow the actual network destination, not just the string originally supplied by the user. The report does not state which of these changes, if any, the application later made.
Variants to test
- Per-field validation drift. Configure each URL field in an integration separately with a private destination and with
http:. A positive result is one field saving a destination that another field rejects. - Redirect revalidation. Point a field at a public redirector that returns a 302 to an internal address. A positive result is a connection-time error (timeout, refused) instead of a validation error, showing the redirect was followed.
- Alternate IP representations. Try non-dotted forms of loopback and private addresses. A positive result is acceptance where the dotted form was rejected, or a resolution-then-validation gap.
- Deferred fetches. For fields not fetched on save (
token_url,userinfo_url), find a login or authentication entry point that uses the stored configuration. A positive result is requests arriving at your controlled server from the application's infrastructure. - Response consumption. Return distinctive canaries from your own
userinfoendpoint. A positive result is the canary appearing as an identity claim or in application output. - Error-body reflection. Return a unique marker with a 404 from a controlled server on an integration save. A positive result is the marker appearing in the application's API error response.
- Header forwarding. Observe which headers the backend sends to your controlled server, including partially controlled authentication values. A positive result is a header whose value you influenced reaching your host.
- Error-based oracle. Compare connection refused, timeout and HTTP 401 responses across destinations. A positive result is distinguishable states that reveal internal reachability without scanning.
What happened, in plain words
A security researcher was looking at an administration panel, a private web page where an administrator can change settings for a piece of software. One of those settings let the administrator connect the software to an outside login service, so that people could sign in with an account held somewhere else. This kind of outside login service is called an OIDC identity provider. OIDC stands for OpenID Connect, and it is the standard way many websites let you "sign in with" another company's account.
The settings form had a handful of boxes where the administrator types web addresses (URLs). The researcher asked a simple question: when I type an address into one of these boxes, does the software's own server actually go and visit that address, or does it just store it and let my browser deal with it later? That difference is the whole story. If the server visits an address that a user supplied, an attacker can make the server visit places the attacker is not allowed to reach directly. That class of bug is called SSRF, short for Server-Side Request Forgery.
What the researcher found was bigger than one bad check. Several of those address boxes were handled by different parts of the software, with different levels of protection. One box blocked internal addresses but could be tricked with a redirect. Another box had no such protection at all. Later, the researcher found a way to make the software actually use those stored addresses during a login, and to see data coming back. A separate feature even echoed the response from a remote server back inside an error message. The lesson is that the protection was applied here and there, not everywhere, and that finding the request was only the beginning.

The setting that started it
The researcher was not hunting for SSRF on purpose. They were looking at an authenticated administration panel that allowed administrators to configure an external OIDC identity provider. That panel let an administrator configure an external OIDC identity provider.
To understand the rest, you need a rough picture of what OIDC does. When a website offers "sign in with" some other service, three parties are involved: your browser, the website you are trying to use, and the identity provider that holds your account. The website needs to know a few addresses to talk to the identity provider: where to send you to log in, where to exchange a code for a token, where to ask who you are, and where to fetch the public keys used to check that the token is genuine. Those addresses are exactly the fields in the form.
The form contained the kind of fields you would expect:
authorization_urltoken_urluserinfo_urljwks_urlclient_idclient_secret
Line by line, in plain words:
authorization_urlis the address the browser is sent to when you start logging in. It is where the identity provider shows its login page.token_urlis the address the website's server calls to swap a short-lived code for an actual token, a piece of data that proves who you are.userinfo_urlis the address the website's server calls to ask the identity provider for details about the person who just logged in, such as a username or an email address.jwks_urlis the address where the identity provider publishes its public keys. A public key is the half of a cryptographic key pair that anyone may see; it is used to check signatures. The website fetches the keys from here so it can verify that tokens really came from that provider.client_idis a public identifier for the website's registration with the identity provider, a bit like a username for the application itself.client_secretis the matching password for that registration. It must be kept private.
The researcher's first thought was not about attacks. It was a plain question: which of these URLs does the backend actually request? "Backend" means the software running on the company's server, as opposed to the part running in your browser. There is a big security difference between two situations:
Browser stores URL -> browser later uses URL
and:
User supplies URL -> application server fetches URL
In the first case, the address is used by your own browser, on your own machine. If you type in a silly address, only you are affected. In the second case, the company's server goes and visits the address. If an attacker can choose that address, the attacker is effectively using the company's server as a proxy to reach places the attacker cannot reach from outside. That is where SSRF begins. A useful everyday comparison: handing someone a note with an address on it is harmless, but asking a member of staff to go to that address and bring back what they find is a completely different request, because the staff member can enter rooms you cannot.
The first sign
The researcher started with the JWKS URL. Instead of giving the application a real JWKS endpoint, they used a server they controlled and saved the configuration. A server they controlled means a machine on the internet that the researcher set up and can watch, so any request arriving there is visible in its logs.
A few seconds later, an HTTP request arrived. HTTP is the language browsers and servers use to exchange web pages and data; a request is one message asking for something, and a response is the reply. That was the first important result. The request did not come from the researcher's browser. It came from the application's infrastructure, meaning the company's own servers.
So the flow was effectively:
Administrator | | saves OIDC configuration vApplication backend | | GET vAttacker-controlled server
Reading the diagram from top to bottom: the administrator saves the OIDC configuration in the panel. The application backend then makes a GET request, which is the simplest kind of HTTP request, the one a browser makes when you open a page, to the server the attacker controls. The arrow labelled GET is the key part: the company's server is the one making the outbound connection.
At this point the researcher had a server-side request primitive. "Primitive" here means a basic building block: the ability to make the server send a request somewhere. But that alone is not necessarily an interesting SSRF. Plenty of applications intentionally fetch remote configuration, for example to load a list of keys. The important question was whether the researcher could control where the server was allowed to connect.
Testing the obvious internal destinations
The next test was boring on purpose. The researcher changed the JWKS URL to a loopback or private destination. A loopback address is one that always means "this same machine", usually written as 127.0.0.1. A private address is one used only inside a company's own network, not reachable from the public internet. If the server can be made to visit those, it can talk to services that were never meant to be exposed.
The application rejected it with an error similar to:
URL cannot reference private, loopback, or link-local addresses
This single line is an error message shown by the application. It says the URL points at a private address, a loopback address, or a link-local address. Link-local addresses are a special range used for automatic configuration on a local network segment. The message means the application has a check that refuses these destinations.
That was actually a good sign for the application's security. It meant somebody had thought about SSRF. The researcher also tried alternative representations of IP addresses rather than only a normal dotted address. An IP address is the numeric address of a machine on a network, normally written as four numbers separated by dots. There are other ways to write the same number, for example as one large integer, and attackers use those tricks to slip past naive filters that only look for the text "[redacted]".
The application still detected them. So this was not just:
if "[redacted]" in url: block()
This snippet is pseudo-code, a sketch of what a weak check might look like. Line one asks whether the literal text [redacted] appears anywhere in the URL. Line two blocks the request if it does. Such a check is easy to defeat by writing the same address in a different form. The researcher concluded the hostname was apparently being resolved before validation. Resolving means turning a name like example.com into its numeric IP address by asking the Domain Name System, the internet's phone book. Validating after resolution is stronger, because the check sees the real address rather than the text the user typed.
For a moment, it looked like this path was properly protected. Then the researcher started thinking about when the validation happened. Timing is everything in this kind of bug: a check that runs at the wrong moment can be useless even if it is correct in itself.
What about redirects?
A redirect is a reply from a web server that says "not here, go to this other address instead". Browsers follow redirects automatically, and so do many programs that make HTTP requests. The researcher imagined the application performing approximately this logic:
validate(user_url)
response = http_client.get(user_url)
Line by line: the first block calls a function that checks the URL the user supplied. The second block then asks an HTTP client, a piece of software that makes web requests, to fetch that same URL. The two steps are separate. Whatever the client does afterwards is not checked again.
Now imagine the URL is:
https://public.example/redirect
This is an address on a public server that simply redirects visitors somewhere else. The validator sees:
public.example -> public IP
In words: the name public.example resolves to a public IP address, one reachable from the open internet. Everything looks fine. But the server responds:
HTTP/1.1 302 FoundLocation: https://internal-address/
Line by line: the first line is the status line of an HTTP response. 302 Found is the standard code for a temporary redirect. The second line is a header, a labelled piece of metadata attached to the response. Location tells the client where to go next, and here it points at an internal address.
What happens next depends on the HTTP client. If redirects are automatically followed, the real request becomes:
Application | | request public URL vPublic redirector | | HTTP 302 vInternal network
The application asks the public redirector for a page. The redirector answers with a 302 pointing inside. The client follows that instruction and connects to the internal network. If the destination is not validated again after the redirect, the original SSRF protection becomes almost useless, because the attacker only has to get past the first check with a harmless public address.
So the researcher tested exactly that. First, a direct internal destination:
jwks_url = https://<internal-address>/
This line sets the JWKS URL setting to an internal address. The angle brackets mark a placeholder, a value left out of the public write-up. Result:
Blocked: private destination
A short error saying the destination is private and was refused. Then:
jwks_url = https://<public-redirector>/?url=https://<internal-address>/
This sets the same setting to a public redirector, with the internal address passed as a parameter called url. A parameter is a value appended to a URL after a question mark, used to pass information to the page. This time the researcher received a completely different error:
Couldn
That is a truncated error message, cut off in the write-up. The exact wording is not given, but the point is that it differed from the block message. That difference mattered. The direct request was rejected before a connection attempt. The redirected request passed validation and later failed while connecting to the final host. Same destination, different path.
That gave the researcher the differential they wanted. A differential simply means comparing two outcomes that should be the same and noticing they are not. Here it was:
DIRECTpublic validation -> internal IP detected -> BLOCK
REDIRECTpublic validation -> public IP accepted -> HTTP 302 -> internal IP -> connection attempted
In the direct case, the validator looked at the internal address, recognised it as private, and stopped everything. In the redirect case, the validator looked only at the public redirector, accepted it, and then the HTTP client followed the 302 to the internal address and tried to connect. The application was validating the first URL, but trusting the HTTP client after that. That was the first SSRF bypass.
Then I found something worse
Once the researcher knew the OIDC implementation was making server-side requests, they stopped treating the four URL fields as one feature. They might look similar in the user interface, but backend applications frequently handle them using completely different code paths. A code path is simply the route through the program that a particular action takes; two buttons that look alike can end up in entirely different functions.
So the researcher tested each field independently. That turned out to be important. The JWKS field had:
HTTPS-only validationprivate-IP validation
Two protections, listed as two lines. HTTPS-only means the address must use HTTPS, the encrypted version of HTTP, so traffic cannot be read or altered in transit. Private-IP validation means private addresses are refused. But another OIDC URL field accepted something equivalent to:
http:
That is the unencrypted scheme, the part of a URL before the colon that says which protocol to use. It was saved successfully. No HTTPS requirement, no private-address rejection, and no redirect bypass was even necessary. The researcher could simply type an internal address and the application stored it.
That immediately changed the model of the vulnerability. The researcher was not looking at one badly implemented SSRF filter. They were looking at multiple server-side URL consumers with inconsistent security controls. A consumer here means a piece of code that takes a URL and fetches it. Conceptually, the application looked something like this:
OIDC configuration | +---------------+---------------+ | | | JWKS URL Token URL UserInfo URL | | | validation weak/no weak/no + HTTPS validation validation | server fetch
Reading the diagram: the OIDC configuration splits into three URL fields. The JWKS URL gets validation plus an HTTPS requirement. The Token URL and UserInfo URL get weak or no validation. Only the JWKS URL is shown leading to a server fetch, because that is the one the researcher had confirmed was fetched at save time. The point is the uneven protection across fields that sit side by side.
This is one of the reasons the researcher does not stop testing after seeing a good validation error. A good error on one field says nothing about the next field. Two fields living next to each other in the same JSON object do not mean they use the same backend library or validator. JSON is a common text format for structured data, made of names and values in curly braces; it is how many web applications send settings to and from the browser.
Saving an SSRF isn't the same as triggering it
There was still an important problem. The researcher could prove that an internal URL could be stored. But did the application ever actually request it? Storing an address in a database is harmless on its own; the danger comes when something later dials it.
OIDC URLs such as token_url and userinfo_url normally aren't requested while saving configuration. They're requested later during authentication, when a user actually logs in. So now the researcher needed to find a way to trigger the OAuth/OIDC flow using only their own test setup. OAuth is the related standard for granting access; the login flow is the sequence of steps a browser and servers go through when someone signs in.
After mapping the login flows, the researcher found a secondary authentication entry point that used the configuration they controlled. An entry point is a place in the application where a login can be started. Secondary means it was not the main login page but another route that also used the same settings. That was the breakthrough.
The researcher built a small mock OIDC provider on infrastructure they controlled. Mock means a fake stand-in that behaves like the real thing. It served these paths:
/.well-known/openid-configuration/authorize/token/jwks/userinfo
These are the paths the mock provider served, one per line. A path is the part of a URL after the domain name. /authorize is where a user is sent to log in. /token is where a code is exchanged for a token. /jwks publishes the public keys. /userinfo returns details about the logged-in user.
The researcher generated their own signing key, served the public key through JWKS, and returned properly signed tokens. A signing key is the private half of a key pair, used to create a signature; the matching public key lets anyone verify it. Because the researcher controlled both halves, the application would accept the tokens as genuine.
Then the researcher initiated the application's login flow. Their server logs started receiving requests. The sequence looked roughly like this:
Browser | | starts login vApplication | +------> attacker /authorize | +------> attacker /token | +------> attacker /jwks | +------> attacker /userinfo
Reading it: the browser starts a login. The application then contacts the attacker's /authorize, /token, /jwks and /userinfo endpoints in turn. The interesting part was that the last three requests were performed by the application server. The browser was only involved at the start. That was runtime confirmation that the URLs were not merely stored configuration: they became network destinations used by the backend. Runtime means while the application was actually running and handling a login, not just while saving a form.
From blind SSRF to a response channel
Being able to make a server connect to an internal address is useful. Being able to retrieve the response is much more interesting. When the server only connects and you never see the reply, it is called blind SSRF: you know a request happened, but not what came back. A response channel means you can see the data that the server received.
The userinfo request gave the researcher a potential path. In a normal OIDC flow, the identity provider might return something like:
{ "sub": "12345", "email": "[redacted]", "name": "Example User"}
This is a JSON object with three fields. sub is the subject identifier, a unique ID for the user. email is the user's email address. name is a display name. These are the claims, the pieces of information about the user that the identity provider asserts.
The application fetches that JSON and converts it into identity claims. That means the data flow becomes:
Configured URL | vServer-side HTTP request | vHTTP response body | vOIDC claim parser | vApplication
Reading top to bottom: the configured URL leads to a server-side HTTP request. The response body, the actual content returned, goes into an OIDC claim parser, a piece of code that reads the JSON and turns it into claims. The claims then go into the application, which uses them to decide who the user is. That's a very different primitive from a simple port scan, because the response is actually being consumed by the application, not just discarded.
To prove the data path safely, the researcher made their own /userinfo endpoint return distinctive canaries:
{ "sub": "researcher-test", "name": "SSRF_RESPONSE_CANARY", "custom_marker": "CONTROLLED_TEST_VALUE"}
A canary here is a unique marker value planted on purpose so it can be spotted later, like a canary in a coal mine. Line by line: sub is set to researcher-test, an obvious test identifier. name is set to SSRF_RESPONSE_CANARY, a string nobody else would produce by accident. custom_marker is set to CONTROLLED_TEST_VALUE, another unique value. If any of these appear in the application, it proves the application read the researcher's response.
The application processed them as identity claims. At that point the researcher had demonstrated:
attacker-selected server ->backend fetch ->attacker-selected response ->application data processing
In words: the attacker chooses the server, the backend fetches from it, the attacker chooses the response, and the application processes that response as data. The researcher deliberately did not try to extract sensitive production information from internal services. For them, the important part was proving the primitive with controlled data and understanding what would happen if an internal HTTP service returned compatible content. In other words: show the mechanism works, without touching real private data.
A completely different feature confirmed the pattern
While mapping other places where administrators could supply network destinations, the researcher found another integration feature. An integration is a connection between the application and some outside service. This one contacted an external API when its configuration was saved. An API is a defined way for one program to talk to another, usually over HTTP, with agreed addresses and data formats.
Again, the researcher pointed it at infrastructure they controlled. The server connected. But this sink had an additional behaviour. A sink is a place in the code where data ends up being used, here a place that makes an outbound request. The application forwarded an authentication header whose value was partially controlled by the configuration. A header is a labelled piece of metadata sent with an HTTP request; an authentication header carries credentials proving who is calling. Partially controlled means the attacker could influence part of its value through the settings.
Conceptually:
GET /some/fixed/path HTTP/1.1Host: attacker.exampleAuthorization: <attacker-controlled-value>
Line by line: GET /some/fixed/path HTTP/1.1 is the request line, asking for a fixed path using version 1.1 of HTTP. Host: attacker.example says which server the request is for. Authorization: <attacker-controlled-value> is the authentication header, with a placeholder showing that its value was influenced by the configuration. The path was fixed, and part of the authentication header value was under the attacker's influence.
More importantly, certain HTTP errors from the remote server were returned inside the application's own API error response. In other words, if the remote server answered with an error, the application copied the remote server's reply into the error message it showed to the administrator. The researcher tested it with a unique canary body:
SSRF_RESPONSE_BODY_CANARY_93A7
This is a single unique string, chosen so it cannot appear by chance. The controlled server returned:
HTTP/1.1 404 Not FoundContent-Type: text/plain
Line by line: HTTP/1.1 404 Not Found is the status line, saying the requested resource does not exist. Content-Type: text/plain says the body is plain text, not HTML or JSON. Then the body itself:
SSRF_RESPONSE_BODY_CANARY_93A7
The application's API response then contained:
SSRF_RESPONSE_BODY_CANARY_93A7
The same marker, now inside the application's own reply. That was a clean response-body reflection primitive. Reflection means the application took data from one place and echoed it back in another. The chain was now:
Attacker | | supplies URL vApplication backend | | GET internal/remote destination vTarget service | | response body vApplication backend | | error message vAttacker
Reading it: the attacker supplies a URL. The application backend sends a GET to that destination. The target service returns a response body. The application backend puts that body into an error message. The error message reaches the attacker. This was much stronger evidence than simply saying "I got a timeout, therefore SSRF". The researcher had controlled both sides and watched a marker make the complete round trip.
Why different errors matter
One thing that helped a lot during this hunt was treating application errors as network observations. An error message is not just a failure; it is information about what happened on the network.
Suppose the researcher tested three destinations and received:
A -> connection refusedB -> request timed outC -> HTTP 401
Three outcomes, one per line. connection refused means the target machine actively rejected the connection. request timed out means no answer came back within the allowed time. HTTP 401 is the status code for "unauthorised", meaning a web service answered but wanted credentials. Those aren't just errors. They can reveal different states:
Connection refused -> host reachable, port likely closed/rejecting
A port is a numbered channel on a machine; different services listen on different ports. Refused means the machine is there but nothing is listening on that port, or it is refusing connections.
Timeout -> filtered, blackholed, or service not respondingHTTP 401 -> TCP connection succeeded -> HTTP service responded
Filtered or blackholed means something in between silently dropped the traffic. TCP is the underlying protocol that establishes a reliable connection before HTTP runs on top of it. A 401 proves the connection was made and a web service replied. This effectively creates a small internal network oracle. An oracle here means a way to ask questions and get answers about something you cannot see directly. The researcher didn't need to aggressively scan anything. A handful of controlled tests were enough to prove that the server could distinguish internal network states.
That distinction was also useful when proving the redirect bypass. Compare:
Direct internal URL-> "private address prohibited"
with:
Public URL -> 302 -> same internal URL-> "connection timed out"
In the first case, the validator refused the address before any connection. In the second, the validator accepted the public URL, the client followed the 302, and the failure happened later, at connection time. The second error only makes sense if execution got past the original URL validation and reached the networking layer. Good SSRF reports are often built from these kinds of differentials.
One vulnerability became several sink classes
By the end of the investigation, the researcher no longer thought of this as "the vulnerable OIDC URL". There were several categories:
1. URL with private-IP validation -> bypassable through redirects
2. URL with no equivalent validation -> direct internal destination accepted3. Runtime OAuth/OIDC fetch -> attacker-selected response consumed as claims4. Integration/API fetch -> server-side request + response-body reflection5. Proxy verification functionality -> internal connectivity/status oracle
Line by line: item one is a field that does check for private addresses, but the check can be bypassed with a redirect. Item two is a field with no equivalent check, which accepts an internal destination directly. Item three is the login-time fetch, where the attacker's response is read as identity claims. Item four is the integration feature, which makes a server-side request and reflects the response body. Item five is a proxy verification feature, which acts as an oracle for internal connectivity and status. A proxy here is a service that makes requests on someone else's behalf; verification means checking whether it works.
Different features. Different HTTP clients. Different validation. Same underlying lesson: the application had multiple ways to turn configuration data into outbound server requests, but the SSRF policy was not centralised. Centralised means one shared set of rules applied everywhere, rather than each feature doing its own thing.
I initially undersold the bug
The first version of the report was deliberately conservative. At that stage the researcher had proved:
server-side request+private-IP protection bypass+internal connection attempt
Three things, one per line: a server-side request happened, the private-IP protection could be bypassed, and an internal connection was attempted. The interesting runtime path had not yet been proved. So the impact was framed around authenticated SSRF rather than claiming hypothetical credential theft or internal compromise. Framing the impact means describing what harm is possible; authenticated means the attacker needs to be logged in as an administrator.
Then the researcher kept investigating. Once the login flow that triggered the OIDC requests was found, the story changed substantially. The researcher could now prove that the attacker-controlled URLs were used at runtime and that returned data entered the application's identity-processing pipeline. A pipeline here is the chain of steps that turns a response into a decision about who the user is. Later, the separate response-reflection sink strengthened the case further.
This is an important bug bounty lesson. A bug bounty is a programme where companies pay researchers for reporting security problems responsibly. Don't inflate the first result. Improve the evidence instead. A statement like "This could potentially read AWS credentials and lead to RCE" is weak if you can't demonstrate it. AWS credentials are cloud access keys; RCE stands for remote code execution, running your own code on someone else's server. A statement like "Here is the request leaving the backend, here is the direct-vs-redirect differential, here is the controlled response, and here is the same canary appearing in the application" is much harder to argue with.
The remediation was more interesting than "block [redacted]"
Remediation means the fix. Because the issue existed across multiple fetch paths, a simple string blacklist wouldn't have solved it. A blacklist is a list of forbidden values; string matching means comparing text. The important protections were architectural, meaning they concern how the system is built rather than one line of code:
1. Parse the URL.
Parsing means breaking the URL into its parts, such as scheme, host and path, so the program understands it rather than treating it as raw text.
2. Allow only expected schemes.3. Resolve the hostname.4. Reject loopback, private, link-local, multicast, and other prohibited ranges.5. Connect only to the validated address.6. If redirects are allowed: validate EVERY redirect destination again.7. Consider disabling redirects entirely where they provide no legitimate functionality.8. Apply the same URL policy to every backend HTTP client.9. Don't return arbitrary upstream response bodies inside application errors.
Line by line: item two means only permit schemes you expect, such as HTTPS, and refuse others. Item three means look up the hostname to get its real IP address. Item four means refuse loopback, private, link-local, multicast and other ranges that should never be reachable. Multicast is a range used for sending to groups of machines, not for ordinary web traffic. Item five means connect to the address you validated, not to whatever the name resolves to later, which prevents a trick where the name changes between check and use. Item six means if you allow redirects, check every hop again. Item seven means if redirects serve no purpose, turn them off. Item eight means use one shared policy for every HTTP client in the backend. Item nine means do not copy arbitrary responses from remote servers into your own error messages.
The redirect rule deserves emphasis. This is unsafe:
validate(initial_url)http_client.get(initial_url, follow_redirects=True)
Line one checks the original URL. Line two fetches it with redirects enabled, meaning the client will follow any 302 it receives. The check only ever saw the first address. A safer model is:
url = initial_url
for redirect in allowed_redirects: destination = resolve_and_validate(url) response = request(destination) if not response.is_redirect: return response url = response.locationraise TooManyRedirects()
Line by line: set the current URL to the original. Then loop over allowed redirects. For each step, resolve and validate the current URL, so the check sees the real destination. Make the request to that validated destination. If the response is not a redirect, return it, because we are done. If it is a redirect, set the current URL to the location the response points at and go round again. If the loop runs out, raise a TooManyRedirects error. Validation has to follow the actual network destination, not just the string originally supplied by the user. The report does not state which of these changes, if any, the application later made.
What I took away from this hunt
The first outbound request was only the beginning. The useful questions were:
Does the backend really fetch it?
Which URL fields are fetched?When are they fetched?Do all fields use the same validator?Is validation performed before or after DNS resolution?Does the HTTP client follow redirects?Are redirect destinations revalidated?Can HTTP be used instead of HTTPS?Can alternate IP representations bypass an edge filter?What headers does the server send?What happens to the response body?Can the response be surfaced back to me?Do errors create a network oracle?Does another feature implement the same behavior differently?
Each line is a question worth asking. Does the backend really fetch the address? Which fields are fetched, and when? Do all fields share one validator? Is the check before or after DNS resolution? Does the client follow redirects, and are redirect destinations checked again? Can plain HTTP be used instead of HTTPS? Can alternate IP representations slip past an edge filter, meaning a filter at the network boundary? What headers does the server send? What happens to the response body? Can the response be surfaced back to the attacker? Do errors create an oracle? Does another feature make the same trust decision differently?
The biggest lesson was that SSRF hunting is often less about finding a URL parameter and more about following the URL through the application's architecture. The researcher started with:
"Does this JWKS field cause a request?"
That eventually became:
configuration ->URL validation ->redirect handling ->multiple HTTP clients ->runtime OAuth requests ->internal network access ->response processing ->response reflection
A chain, one step per line: configuration leads to URL validation, which leads to redirect handling, which leads to multiple HTTP clients, which leads to runtime OAuth requests, which leads to internal network access, which leads to response processing, which leads to response reflection. And that is where the interesting bug was hiding. Never stop at "the server made a request." Figure out where that request can go, what it carries, what comes back, and which other parts of the application make the same trust decision differently.
Glossary
- API: a defined way for one program to talk to another, usually over HTTP, with agreed addresses and data formats.
- Authentication header: a labelled piece of metadata sent with an HTTP request that carries credentials proving who is calling.
- Backend: the software running on the company's server, as opposed to the part running in your browser.
- Blacklist: a list of forbidden values that a check refuses.
- Blind SSRF: a server-side request where you know a request happened but cannot see the response.
- Bug bounty: a programme where companies pay researchers for reporting security problems responsibly.
- Canary: a unique marker value planted on purpose so it can be spotted later if it travels somewhere.
- Claim: a piece of information about a user asserted by an identity provider, such as a name or email address.
- Code path: the route through a program that a particular action takes.
- Connection refused: a network error meaning the target machine actively rejected the connection.
- Consumer (URL consumer): a piece of code that takes a URL and fetches it.
- Differential: comparing two outcomes that should be the same and noticing they are not.
- DNS (Domain Name System): the internet's phone book, turning names into numeric IP addresses.
- Entry point: a place in an application where a login or action can be started.
- GET: the simplest kind of HTTP request, the one a browser makes when you open a page.
- Header: a labelled piece of metadata attached to an HTTP request or response.
- Hostname: the name part of a URL, such as example.com.
- HTTP: the language browsers and servers use to exchange web pages and data.
- HTTPS: the encrypted version of HTTP, so traffic cannot be read or altered in transit.
- Identity provider: an outside service that holds accounts and vouches for who a user is.
- Integration: a connection between an application and some outside service.
- IP address: the numeric address of a machine on a network, normally written as four numbers separated by dots.
- JSON: a common text format for structured data, made of names and values in curly braces.
- JWKS: the standard location where an identity provider publishes its public keys.
- Link-local address: a special address range used for automatic configuration on a local network segment.
- Loopback address: an address that always means "this same machine", usually 127.0.0.1.
- Mock: a fake stand-in that behaves like the real thing.
- Multicast: an address range used for sending to groups of machines, not for ordinary web traffic.
- OIDC (OpenID Connect): the standard way many websites let you sign in with another company's account.
- Oracle: a way to ask questions and get answers about something you cannot see directly.
- Parameter: a value appended to a URL after a question mark, used to pass information to the page.
- Parse: break a URL into its parts, such as scheme, host and path, so the program understands it.
- Path: the part of a URL after the domain name.
- Pipeline: a chain of steps that turns a response into a decision.
- Port: a numbered channel on a machine; different services listen on different ports.
- Primitive: a basic building block of an attack, such as the ability to make the server send a request.
- Private address: an address used only inside a company's own network, not reachable from the public internet.
- Proxy: a service that makes requests on someone else's behalf.
- Public key: the half of a cryptographic key pair that anyone may see, used to check signatures.
- RCE (remote code execution): running your own code on someone else's server.
- Redirect: a reply from a web server saying "not here, go to this other address instead".
- Reflection: when an application takes data from one place and echoes it back in another.
- Remediation: the fix for a vulnerability.
- Resolve: turn a hostname into its numeric IP address by asking DNS.
- Response body: the actual content returned by an HTTP response.
- Scheme: the part of a URL before the colon that says which protocol to use, such as http or https.
- Server-side request: a request made by the company's server rather than by your browser.
- Signing key: the private half of a key pair, used to create a signature.
- Sink: a place in code where data ends up being used, here a place that makes an outbound request.
- SSRF (Server-Side Request Forgery): a bug where an attacker makes a server send requests to destinations the attacker chooses.
- Status code: the number in an HTTP response saying what happened, such as 302 for a redirect or 401 for unauthorised.
- TCP: the underlying protocol that establishes a reliable connection before HTTP runs on top of it.
- Timeout: a network error meaning no answer came back within the allowed time.
- Token: a piece of data that proves who you are, issued after a successful login.
- URL: a web address.
- Validator: a check that inspects a value and decides whether it is allowed.
- Vulnerability: a weakness in software that an attacker can use to do something harmful.