FedoraOperating system · Fedoraproject

CVE-2022-39369

HIGH · 8.0 CVSS v3.1 Published 2022-11-01
Fix available
A fix is available. Upgrade to 1.6.0 or later.
See remediation →
84/100
Remediation priority · High
Remotely reachable

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 · unedited
phpCAS 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 confidence

phpCAS < 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.

MitigationUpgrade 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.

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
FedoraOperating system
Affected:= 35= 36= 37
PhpcasApplication
Affected:< 1.6.0

CVSS 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 checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed phpCAS version
    Locate 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 files
    Affected if The installed version is lower than 1.6.0
  2. Inspect CAS client initialization code
    Review the PHP files where phpCAS::client() or phpCAS::proxy() is called to see if a base service URL is passed as the second argument
    Affected if No explicit base URL is passed to the client constructor and phpCAS::setUrl() is not called elsewhere in the code
  3. Check for explicit URL configuration
    Search the codebase for calls to phpCAS::setUrl() or phpCAS::setCallbackURL() that would set the service URL explicitly
    Affected if Neither setUrl() nor setCallbackURL() is called anywhere in the initialization flow, causing the library to derive the URL from HTTP headers
  4. Verify Host header handling
    If 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 application
    Affected 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.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Upgrade available Upgrade to 1.6.0 or later
Fixed in 1.6.0
Interim mitigation

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.

Recommended fix High confidence

phpCAS 1.6.0

  1. 1. Back up your current phpCAS implementation and any custom configurations
  2. 2. Download phpCAS 1.6.0 or later from the official repository (github.com/apereo/phpCAS)
  3. 3. Replace the existing phpCAS library files with the new version
  4. 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. 5. Test the authentication flow thoroughly to ensure tickets are being validated correctly with the new service URL enforcement
  6. 6. Verify that your CAS server service registry is configured with strict, known service URL patterns for additional defense in depth
Caveat phpCAS 1.6.0 is a major version upgrade that requires passing an additional service base URL argument when constructing the client class; existing configurations may need code changes

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Fedora Scoped from the published advisory
  • Consultation3.0 h
  • Implementation6.0 h
  • Testing3.0 h
  • Review / QA2.0 h
14.0 hours of engineering $2,490
Get the upgrade done

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 locally
dbcve dependency scanner

Check 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2022-39369 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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