The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-1996

CVE-2022-1996: Go-restful Auth Bypass Vulnerability

CVE-2022-1996 is an authorization bypass flaw in Go-restful that allows attackers to circumvent authentication through user-controlled keys. This article covers the technical details, affected versions, and mitigation.

Published: February 17, 2026

CVE-2022-1996 Overview

CVE-2022-1996 is an Authorization Bypass Through User-Controlled Key vulnerability in the GitHub repository emicklei/go-restful prior to version v3.8.0. This vulnerability exists in the Cross-Origin Resource Sharing (CORS) filter implementation, where improper validation of the Origin header allows attackers to bypass domain restrictions and access protected resources.

Critical Impact

This vulnerability allows unauthenticated attackers to bypass CORS domain restrictions via network access, potentially leading to unauthorized access to sensitive data and the ability to modify protected resources without any user interaction.

Affected Products

  • go-restful versions prior to v3.8.0
  • Fedora 35
  • Fedora 36

Discovery Timeline

  • 2022-06-08 - CVE-2022-1996 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-1996

Vulnerability Analysis

The vulnerability resides in the CORS filter implementation within cors_filter.go of the go-restful library. The flaw stems from improper validation of the AllowedDomains configuration, where the library used regular expression matching for allowed domain entries. This approach allowed attackers to craft malicious Origin headers that could match allowed domain patterns in unintended ways, effectively bypassing CORS restrictions.

The go-restful library is a widely-used Go package for building RESTful web services, making this vulnerability particularly impactful for organizations running microservices and API backends built with this framework. When CORS protections are bypassed, attackers can make cross-origin requests that should otherwise be blocked, potentially accessing sensitive API endpoints and user data.

Root Cause

The root cause is classified as CWE-639: Authorization Bypass Through User-Controlled Key. The vulnerability exists because the CORS filter allowed regular expression patterns in the AllowedDomains configuration, enabling attackers to manipulate the Origin header to match these patterns inappropriately. The implementation failed to use exact matching for domain validation, creating an exploitable condition where user-controlled input (the Origin header) could be crafted to bypass authorization controls.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Identifying a target application using a vulnerable version of go-restful with CORS restrictions configured
  2. Crafting a malicious Origin header that exploits the regular expression matching behavior
  3. Sending cross-origin requests with the crafted Origin header to bypass domain restrictions
  4. Accessing protected API endpoints and resources that should be restricted by CORS policy

The security patch addresses this by implementing exact matching of allowed domain entries and introducing an optional AllowedDomainFunc for custom validation logic:

go
 // http://enable-cors.org/server.html
 // http://www.html5rocks.com/en/tutorials/cors/#toc-handling-a-not-so-simple-request
 type CrossOriginResourceSharing struct {
-	ExposeHeaders  []string // list of Header names
-	AllowedHeaders []string // list of Header names
-	AllowedDomains []string // list of allowed values for Http Origin. An allowed value can be a regular expression to support subdomain matching. If empty all are allowed.
+	ExposeHeaders []string // list of Header names
+
+	// AllowedHeaders is alist of Header names. Checking is case-insensitive.
+	// The list may contain the special wildcard string ".*" ; all is allowed
+	AllowedHeaders []string
+
+	// AllowedDomains is a list of allowed values for Http Origin.
+	// The list may contain the special wildcard string ".*" ; all is allowed
+	// If empty all are allowed.
+	AllowedDomains []string
+
+	// AllowedDomainFunc is optional and is a function that will do the check
+	// when the origin is not part of the AllowedDomains and it does not contain the wildcard ".*".
+	AllowedDomainFunc func(origin string) bool
+
+	// AllowedMethods is either empty or has a list of http methods names. Checking is case-insensitive.
 	AllowedMethods []string
 	MaxAge         int // number of seconds before requiring new Options request
 	CookiesAllowed bool

Source: GitHub Commit

Detection Methods for CVE-2022-1996

Indicators of Compromise

  • Unexpected cross-origin requests in application logs from domains not in the allowed list
  • Anomalous Access-Control-Allow-Origin response headers returning values that should be blocked
  • API access patterns from origins that do not match legitimate application domains
  • Increased authentication failures or unauthorized data access from cross-origin sources

Detection Strategies

  • Review application dependency manifests (go.mod, go.sum) for go-restful versions below v3.8.0
  • Implement web application firewall (WAF) rules to detect and alert on suspicious Origin header patterns
  • Audit CORS response headers in production environments to identify unexpected allowed origins
  • Enable detailed logging for CORS preflight requests and cross-origin API calls

Monitoring Recommendations

  • Monitor HTTP request logs for unusual Origin headers, particularly those with special characters or patterns
  • Set up alerts for CORS-related security events in application monitoring systems
  • Track dependency versions across development and production environments using software composition analysis (SCA) tools
  • Implement runtime application self-protection (RASP) to detect CORS bypass attempts

How to Mitigate CVE-2022-1996

Immediate Actions Required

  • Upgrade go-restful to version v3.8.0 or later immediately
  • Audit all applications using go-restful for vulnerable versions in the dependency tree
  • Review and strengthen CORS configurations to use explicit domain allow-lists
  • Implement additional authorization checks at the API layer as defense-in-depth

Patch Information

The vulnerability has been fixed in go-restful version v3.8.0. The patch implements exact matching for allowed domain entries instead of regular expression matching, and introduces an optional AllowedDomainFunc callback for custom validation logic when needed. Organizations should update their dependencies to the patched version as soon as possible.

For detailed information, refer to:

  • GitHub Commit with Security Fix
  • Huntr Bounty Report
  • NetApp Security Advisory

Workarounds

  • Implement additional server-side authorization checks that do not rely solely on CORS for security
  • Use an explicit whitelist of allowed origins and validate the Origin header at the application layer
  • Deploy a reverse proxy or API gateway with strict CORS enforcement as an additional layer
  • Consider using the AllowedDomainFunc callback (in patched versions) for strict custom validation logic
bash
# Update go-restful dependency to patched version
go get github.com/emicklei/go-restful/v3@v3.8.0

# Verify the updated version in go.mod
go list -m github.com/emicklei/go-restful/v3

# Run dependency audit
go list -m -versions github.com/emicklei/go-restful/v3

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechGo Restful

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.96%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-639
  • Technical References
  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • NetApp Security Advisory
  • Vendor Resources
  • GitHub Commit Changes

  • Huntr Bounty Report
  • Latest CVEs
  • CVE-2026-35467: Browser API Key Information Disclosure

  • CVE-2026-35466: cveInterface.js XSS Vulnerability

  • CVE-2026-30252: ZenShare Suite XSS Vulnerability

  • CVE-2026-30251: ZenShare Suite v17.0 XSS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English