Fix critical rails vulnerability