CVE-2022-39369
PHP vulnerability analysis and mitigation

Overview

The phpCAS library, a Central Authentication Service client library in PHP, was found to be vulnerable to a service hostname discovery exploitation issue identified as CVE-2022-39369. The vulnerability was discovered by Filip Hejsek and disclosed in October 2022. The issue affects phpCAS versions prior to 1.6.0, impacting systems that use this library for CAS authentication (GitHub Advisory).

Technical details

The vulnerability stems from phpCAS's use of HTTP headers to determine the service URL used for ticket validation. The library relied on potentially manipulable headers such as X-Forwarded-Host, X-Forwarded-Server, Host, X-Forwarded-Proto, and X-Forwarded-Protocol for service URL discovery. This implementation has a CVSS v3.1 base score of 8.0 (High severity) with the vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H (GitHub Advisory).

Impact

An attacker could exploit this vulnerability to gain unauthorized access to a victim's account on a vulnerable CASified service without the victim's knowledge when they visit the attacker's website while being logged into the same CAS server. The severity of the impact depends on the CAS server's service registry configuration - in worst cases, if URLs are configured with loose patterns (e.g., '^(https)://.*'), any service URL could be potentially compromised (GitHub Advisory).

Mitigation and workarounds

The vulnerability was patched in phpCAS version 1.6.0, which introduced an API-breaking change requiring an additional service base URL argument when constructing the client class. For systems unable to upgrade immediately, workarounds include using phpCAS::setUrl() and phpCAS::setCallbackURL() configurations, or ensuring HTTP header inputs are sanitized before reaching PHP through a reverse proxy. Additionally, configuring the CAS server service registry to only allow known and trusted service URLs can substantially reduce the vulnerability's severity (GitHub Advisory, Debian LTS).

Community reactions

Multiple Linux distributions and software projects responded to this vulnerability by releasing security updates. Ubuntu released security notices (USN-6913-1, USN-6913-2) to address the vulnerability across different versions. Debian provided updates through DLA-3485-1 for its LTS release, and Fedora released an update (FEDORA-2022-76b3530ac2) to address the vulnerability (Ubuntu Notice, Debian LTS).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management