lud

lud

Oaskit 0.14.1 - security release

Hello everyone,

This is a security update for Oaskit. Version 0.14.1 is now on Hex and fixes a reflected cross-site scripting (XSS) vulnerability in the default error handler.

If you are using Oaskit you should upgrade now.

Following the recent effort of scanning libraries with Claude Code and Fable I found a vulnerability in one of my libraries. I will do the same for JSV later.

What was affected

Oaskit’s default error handler (Oaskit.ErrorHandler.Default) can render validation errors as an HTML page when a request’s Accept header contains html. This is enabled by default (html_errors: true) and is genuinely handy in development for reading errors straight from the browser.

The problem: request-controlled values (such as object keys from a request body or query parameter, or a malformed Content-Type) were written into that HTML page without escaping. A crafted link to a validating endpoint could execute JavaScript in the application’s origin, a plain GET navigation is enough, no form or special headers required. Dumb me yeah.

Severity is Medium (CVSS 6.1). The full write-up is in the advisory:

:right_arrow: GHSA-h7xw-x8wr-xpcc

The HTML error page stays on by default, because it’s useful in dev and all interpolated values are now HTML-escaped.

Who should upgrade

All versions before 0.14.1 are affected. If you use Oaskit, please bump:

{:oaskit, "~> 0.14.1"}

Workaround (if you can’t upgrade right away)

Disable HTML error rendering so only JSON errors are returned:

plug Oaskit.Plugs.ValidateRequest, html_errors: false

Apologies for the churn this upgrade causes, and for shipping the issue in the first place.

Thank you for using Oaskit! If you find anything suspicious, please report privately via the repository’s Security tab.

(@AstonJ does that still merge into the main library thread?)

First Post!

AstonJ

AstonJ

Now that any library/project can get one of our new forums we no longer need to merge the threads :icon_biggrin: however if you’d like a reference to updates like this in the main thread then simply link to the main thread like you have - it will then show in the footer of the post:

Btw if you want an easier way to set up one of our new forums (for Oaskit or any other library) you can just give provide the data as Rails create block, we can add it to our seed file and then set you up with the admin thread. Just PM me if you want to do it that way :023:

Where Next?

Popular in News & Updates Top

fhunleth
We recently released Nerves 1.4.0 and an update to the Nerves new project generator, nerves_bootstrap. The biggest change is support for ...
New
jjcarstens
Testing code destined for hardware can be tricky, but it just got one tiny bit easier! :tty0tty was just released which is an Elixir por...
New
hugobarauna
Learn how to use Livebook to build a Machine Learning app and deploy it to Hugging Face in less than 15 minutes. If you have any questio...
New
zachdaniel
The second video from the Ash Primers series is out! https://www.youtube.com/watch?v=GtsL_lIis4Q This one is about the migration generato...
New
zachdaniel
The new Ash Framework site and installer are live. Please try it out and let me know what you think!
New
sorenone
The title doesn’t relay the depth of this announcement, but it is short, balanced, and looked good to us. From open sourcing multiple pac...
New
zachdaniel
What if you had full stack types for SPAs built with tech like React, Inertia, Vue, Svelte… but all of the power Ash Framework and Elixir...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

We're in Beta

About us Mission Statement