---
layout: post
title: Upgrading to Rails 6.1.6.1 and Psych::DisallowedClass
date: 2022-07-13
tags: ["Ruby", "Rails", "Development"]
---

Hey friends, I hope this helps someone not spend a few hours tracking down this issue like I did. Due to the recently released [CVE-2022-32224](https://nvd.nist.gov/vuln/detail/CVE-2022-32224), I needed to update our version of Rails to the proper version, 6.1.6.1. However when I did so, I started getting the following exception all over my code with a very unhelpful stack trace:

<code>
Psych::DisallowedClass: Tried to load unspecified class: Symbol
</code>

Sadly, searching did not turn up any useful leads. Only when I thought to go look at the [commit](https://github.com/rails/rails/commit/611990f1a6c137c2d56b1ba06b27e5d2434dcd6a) in the rails code itself, did the solution become apparent.

I needed to add <code>Symbol</code> to the allowed YAML safe load classes in my environment files like this:

<code>
ActiveRecord.yaml_column_permitted_classes = [Symbol]
</code>

I hope this can help someone else.
