CVE-2022-39369
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedphpCAS is an authentication library that allows PHP applications to easily authenticate users via a Central Authentication Service (CAS) server. The phpCAS library uses HTTP headers to determine the service URL used to validate tickets. This allows an attacker to control the host header and use a valid ticket granted for any authorized service in the same SSO realm (CAS server) to authenticate to the service protected by phpCAS. Depending on the settings of the CAS server service registry in worst case this may be any other service URL (if the allowed URLs are configured to "^(https)://.*") or may be strictly limited to known and authorized services in the same SSO federation if proper URL service validation is applied. This vulnerability may allow an attacker to gain access to a victim's account on a vulnerable CASified service without victim's knowledge, when the victim visits attacker's website while being logged in to the same CAS server. phpCAS 1.6.0 is a major version upgrade that starts enforcing service URL discovery validation, because there is unfortunately no 100% safe default config to use in PHP. Starting this version, it is required to pass in an additional service base URL argument when constructing the client class. For more information, please refer to the upgrading doc. This vulnerability only impacts the CAS client that the phpCAS library protects against. The problematic service URL discovery behavior in phpCAS < 1.6.0 will only be disabled, and thus you are not impacted from it, if the phpCAS configuration has the following setup: 1. `phpCAS::setUrl()` is called (a reminder that you have to pass in the full URL of the current page, rather than your service base URL), and 2. `phpCAS::setCallbackURL()` is called, only when the proxy mode is enabled. 3. If your PHP's HTTP header input `X-Forwarded-Host`, `X-Forwarded-Server`, `Host`, `X-Forwarded-Proto`, `X-Forwarded-Protocol` is sanitized before reaching PHP (by a reverse proxy, for example), you will not be impacted by this vulnerability either. If your CAS server service registry is configured to only allow known and trusted service URLs the severity of the vulnerability is reduced substantially in its severity since an attacker must be in control of another authorized service. Otherwise, you should upgrade the library to get the safe service discovery behavior.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidencephpCAS < 1.6.0 uses HTTP headers (Host, X-Forwarded-Host, etc.) to determine the service URL for CAS ticket validation without proper sanitization. An attacker who controls the host header can use a valid ticket granted for any authorized service in the same CAS SSO realm to authenticate to a vulnerable phpCAS-protected service.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data= 35= 36= 37< 1.6.0CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- Low
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify installed phpCAS versionLocate the phpCAS library in your project (typically in vendor/phpCAS or similar) and check the version in the composer.json, CHANGELOG, or version constant within the source filesAffected if The installed version is lower than 1.6.0
-
Inspect CAS client initialization codeReview the PHP files where phpCAS::client() or phpCAS::proxy() is called to see if a base service URL is passed as the second argumentAffected if No explicit base URL is passed to the client constructor and phpCAS::setUrl() is not called elsewhere in the code
-
Check for explicit URL configurationSearch the codebase for calls to phpCAS::setUrl() or phpCAS::setCallbackURL() that would set the service URL explicitlyAffected if Neither setUrl() nor setCallbackURL() is called anywhere in the initialization flow, causing the library to derive the URL from HTTP headers
-
Verify Host header handlingIf using a reverse proxy or load balancer, inspect configuration to confirm whether X-Forwarded-Host or similar headers are being sanitized before reaching the phpCAS applicationAffected if The application trusts incoming Host or X-Forwarded-Host headers without sanitization and lacks explicit URL configuration
You are affected if phpCAS version is below 1.6.0 AND the application does not explicitly set the service URL via setUrl() or the constructor, allowing attacker-controlled host headers to dictate the validation service URL.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped1.6.0
Upgrade to phpCAS 1.6.0+ which enforces explicit service base URL passing in the client constructor. Alternatively, ensure phpCAS::setUrl() is called (and setCallbackURL() if using proxy mode), or sanitize HTTP headers via a reverse proxy.
phpCAS 1.6.0
- 1. Back up your current phpCAS implementation and any custom configurations
- 2. Download phpCAS 1.6.0 or later from the official repository (github.com/apereo/phpCAS)
- 3. Replace the existing phpCAS library files with the new version
- 4. Update your client code to pass the service base URL argument when constructing the client class, as required in phpCAS 1.6.0 (refer to the upgrading documentation)
- 5. Test the authentication flow thoroughly to ensure tickets are being validated correctly with the new service URL enforcement
- 6. Verify that your CAS server service registry is configured with strict, known service URL patterns for additional defense in depth
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation3.0 h
- Implementation6.0 h
- Testing3.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,984.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2022-39369 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2022-39369 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data