CVE-2022-0981
📋 TL;DR
CVE-2022-0981 is an authorization bypass vulnerability in Quarkus's RestEasy Reactive component where user state and permissions can leak between web requests. This allows authenticated low-privileged users to perform database operations with elevated privileges they shouldn't have. Any Quarkus application using RestEasy Reactive with role-based security is affected.
💻 Affected Systems
- Quarkus
📦 What is this software?
Quarkus by Quarkus
⚠️ Risk & Real-World Impact
Worst Case
An authenticated low-privileged user could perform administrative database operations, potentially leading to data theft, data corruption, or complete system compromise.
Likely Case
Low-privileged users accessing sensitive data or performing unauthorized modifications to application data.
If Mitigated
With proper network segmentation and minimal user privileges, impact is limited to the specific application's database scope.
🎯 Exploit Status
Exploitation requires authenticated access but is straightforward once authenticated. No public exploit code has been released.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Quarkus 2.7.6.Final and later
Vendor Advisory: https://access.redhat.com/security/cve/cve-2022-0981
Restart Required: Yes
Instructions:
1. Update Quarkus to version 2.7.6.Final or later. 2. Update pom.xml or build.gradle to use the new version. 3. Rebuild and redeploy the application. 4. Restart the application server.
🔧 Temporary Workarounds
Switch to Classic RestEasy
allTemporarily replace RestEasy Reactive with classic RestEasy implementation
Update pom.xml: replace 'quarkus-resteasy-reactive' dependency with 'quarkus-resteasy'
Update build.gradle: replace implementation 'io.quarkus:quarkus-resteasy-reactive' with implementation 'io.quarkus:quarkus-resteasy'
🧯 If You Can't Patch
- Implement strict network segmentation to isolate vulnerable applications
- Apply principle of least privilege to database accounts and monitor for unusual access patterns
🔍 How to Verify
Check if Vulnerable:
Check Quarkus version and if using RestEasy Reactive: 1. Check application logs for Quarkus version. 2. Review pom.xml or build.gradle for 'quarkus-resteasy-reactive' dependency.
Check Version:
Check application startup logs for 'Quarkus x.x.x started' or run: java -jar your-app.jar --version
Verify Fix Applied:
1. Confirm Quarkus version is 2.7.6.Final or later. 2. Test authorization functionality with different user roles to ensure proper isolation.
📡 Detection & Monitoring
Log Indicators:
- Unauthorized database operations from low-privileged users
- User performing actions outside their role permissions
- Authorization errors followed by successful operations
Network Indicators:
- Unusual database query patterns from application users
- Increased database activity from specific user sessions
SIEM Query:
source="application.logs" AND ("authorization failed" OR "permission denied") AND "operation successful"