/

CVE-2026-55682

Severity:

HIGH RISK

(8.1)

Session Hijacking (CWE-384) in WeGIA PHP Web Manager

CVE-2026-55682

Deferred

Vulnerability type

Category:

Session Hijacking

CWE:

CWE-200, CWE-384

Impact:

Authenticated Session Takeover and Information Disclosure

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

WeGIA versions before 3.8.6 can reflect an attacker-supplied PHPSESSID value in a Set-Cookie response and reuse DB_HOST as the cookie domain. If a victim authenticates while using an attacker-selected session identifier, the attacker may reuse that identifier to access the victim's authenticated session, while the response can also disclose the internal database host name.

WeGIA versions before 3.8.6 can reflect an attacker-supplied PHPSESSID value in a Set-Cookie response and reuse DB_HOST as the cookie domain. If a victim authenticates while using an attacker-selected session identifier, the attacker may reuse that identifier to access the victim's authenticated session, while the response can also disclose the internal database host name.

Affected context

The issue occurs in WeGIA's session-start handling, which is automatically included across PHP pages. Risk is present when the application accepts a client-controlled session identifier, reflects it into session cookies, and derives the cookie Domain attribute from an internal database-host configuration value. Exploitation depends on a victim authenticating while the attacker-selected identifier remains in use.

The issue occurs in WeGIA's session-start handling, which is automatically included across PHP pages. Risk is present when the application accepts a client-controlled session identifier, reflects it into session cookies, and derives the cookie Domain attribute from an internal database-host configuration value. Exploitation depends on a victim authenticating while the attacker-selected identifier remains in use.

Exploit preconditions

  • Attack surface: WeGIA web requests processed by the shared session-start handler
  • Required access: Ability to cause a victim's browser to use or submit an attacker-selected PHP session identifier
  • Trigger point: Victim authentication while the selected identifier is accepted and reflected by the application
  • Why exploitation is possible: The session handling logic does not reliably replace or rotate the identifier at authentication, allowing the attacker to reuse the known identifier after login
  • Additional exposure: The cookie Domain attribute may reveal the configured internal database host name
  • Attack surface: WeGIA web requests processed by the shared session-start handler
  • Required access: Ability to cause a victim's browser to use or submit an attacker-selected PHP session identifier
  • Trigger point: Victim authentication while the selected identifier is accepted and reflected by the application
  • Why exploitation is possible: The session handling logic does not reliably replace or rotate the identifier at authentication, allowing the attacker to reuse the known identifier after login
  • Additional exposure: The cookie Domain attribute may reveal the configured internal database host name

Why this happens

The primary flaw is an authentication session-management failure mapped to CWE-384: Session Fixation, where a session identifier supplied before authentication remains valid after the user authenticates. The handler also reflects the identifier in a Set-Cookie response and uses an internal database-host value as cookie-domain data, creating a secondary CWE-200: Exposure of Sensitive Information condition. Together, these behaviors weaken session-boundary enforcement and disclose infrastructure details through HTTP response metadata.

The primary flaw is an authentication session-management failure mapped to CWE-384: Session Fixation, where a session identifier supplied before authentication remains valid after the user authenticates. The handler also reflects the identifier in a Set-Cookie response and uses an internal database-host value as cookie-domain data, creating a secondary CWE-200: Exposure of Sensitive Information condition. Together, these behaviors weaken session-boundary enforcement and disclose infrastructure details through HTTP response metadata.

Potential impact

  • An attacker may access a victim's authenticated session
  • Unauthorized actions may be performed with the victim's privileges
  • Account data or institution records could be exposed or modified
  • Session tokens may remain usable until expiration or invalidation
  • The internal database host name may be disclosed
  • Revealed infrastructure details could support further targeted attacks
  • An attacker may access a victim's authenticated session
  • Unauthorized actions may be performed with the victim's privileges
  • Account data or institution records could be exposed or modified
  • Session tokens may remain usable until expiration or invalidation
  • The internal database host name may be disclosed
  • Revealed infrastructure details could support further targeted attacks

General mitigation guidance

Mitigation generally focuses on enforcing server-side session lifecycle controls and separating internal configuration from client-visible cookie attributes.

Common defensive patterns include:

  • Rotate or regenerate the session identifier whenever authentication state changes
  • Reject attacker-supplied or otherwise untrusted session identifiers where appropriate
  • Bind authenticated sessions to server-side state and invalidate pre-authentication sessions
  • Set cookie attributes from explicit, trusted application configuration rather than database connection values
  • Avoid exposing internal host names in response headers or other client-visible metadata
  • Apply secure cookie attributes, appropriate expiration, and server-side logout invalidation
  • Run application components with least privilege and limit the impact of a compromised session

Mitigation generally focuses on enforcing server-side session lifecycle controls and separating internal configuration from client-visible cookie attributes.

Common defensive patterns include:

  • Rotate or regenerate the session identifier whenever authentication state changes
  • Reject attacker-supplied or otherwise untrusted session identifiers where appropriate
  • Bind authenticated sessions to server-side state and invalidate pre-authentication sessions
  • Set cookie attributes from explicit, trusted application configuration rather than database connection values
  • Avoid exposing internal host names in response headers or other client-visible metadata
  • Apply secure cookie attributes, appropriate expiration, and server-side logout invalidation
  • Run application components with least privilege and limit the impact of a compromised session

How teams detect issues like this

Organizations can assess this issue through:

  • Dynamic tests that compare session identifiers before and after authentication
  • Checks for session-cookie reflection and missing identifier rotation in login flows
  • Static analysis and code review rules targeting direct use of request cookies in Set-Cookie responses
  • Review of cookie Domain construction for references to database or internal infrastructure settings
  • HTTP response monitoring for internal host names in cookie attributes
  • Policy enforcement requiring secure session regeneration and approved cookie configuration

Automated application-security and code-review tools may help identify these patterns, but authentication-flow testing remains important.

Organizations can assess this issue through:

  • Dynamic tests that compare session identifiers before and after authentication
  • Checks for session-cookie reflection and missing identifier rotation in login flows
  • Static analysis and code review rules targeting direct use of request cookies in Set-Cookie responses
  • Review of cookie Domain construction for references to database or internal infrastructure settings
  • HTTP response monitoring for internal host names in cookie attributes
  • Policy enforcement requiring secure session regeneration and approved cookie configuration

Automated application-security and code-review tools may help identify these patterns, but authentication-flow testing remains important.

Sources

SourceLink
github.comgithub.com/LabRedesCefetRJ/WeGIA/commit/f59cad3ac7292225e88699cac82775a9f534be05
github.comgithub.com/LabRedesCefetRJ/WeGIA/issues/221
github.comgithub.com/LabRedesCefetRJ/WeGIA/pull/1705
github.comgithub.com/LabRedesCefetRJ/WeGIA/releases/tag/3.8.6
github.comgithub.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-5xhr-jrv8-j4j2

Frequently asked

questions

It can be reachable through web requests, but successful exploitation generally requires influencing a victim's session identifier and having the victim authenticate through the affected application.

The key requirement is control or influence over the session identifier. Whether authentication or an account is needed to establish that condition depends on the application's request and deployment controls.

Regenerate the session identifier on authentication and privilege changes, invalidate the prior session state, and construct cookie attributes only from trusted, explicit configuration.

Use centralized session-management controls, test identifier rotation in security reviews, reject unsafe session-cookie inputs, and monitor responses for internal infrastructure details.

It can be reachable through web requests, but successful exploitation generally requires influencing a victim's session identifier and having the victim authenticate through the affected application.

The key requirement is control or influence over the session identifier. Whether authentication or an account is needed to establish that condition depends on the application's request and deployment controls.

Regenerate the session identifier on authentication and privilege changes, invalidate the prior session state, and construct cookie attributes only from trusted, explicit configuration.

Use centralized session-management controls, test identifier rotation in security reviews, reject unsafe session-cookie inputs, and monitor responses for internal infrastructure details.

Find out what's already
exploitable in your codebase.