2026-08-23 19:18CVE-2026-19565CPANSec
PUBLISHED5.2CWE-341

Apache::AppSamurai::Util versions through 1.01 for Perl generate predictable session authentication keys from the clock and process id in CreateSessionAuthKey

Apache::AppSamurai::Util versions through 1.01 for Perl generate predictable session authentication keys from the clock and process id in CreateSessionAuthKey.

CreateSessionAuthKey runs five rounds of SHA-256, each over a fresh Time::HiRes reading formatted to six decimal places, the running digest, and the process id. CreateSession calls it with an empty key source on every login, and the optional Keysource directive is the only route to the other branch. The result is 64 hex characters. The microsecond field of the first reading takes one of a million values, the later readings follow it within microseconds, and the process id is drawn from a small range.

The key is returned to the browser as the session cookie, and is combined with the configured server key to compute the session id and to encrypt the stored session data. An attacker who knows the second in which a session was created and the process id of the worker that created it can enumerate candidate keys and recover the victim's cookie, bypassing authentication for the protected resources. Each candidate has to be tried against the server, which validates the cookie with a key the attacker does not hold.

Problem type

Affected products

<= 1.01 - AFFECTED

References

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-19565
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-19565",
    "assignerOrgId": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
    "assignerShortName": "CPANSec",
    "dateUpdated": "2026-08-23T22:05:03.347Z",
    "dateReserved": "2026-08-11T18:08:03.462Z",
    "datePublished": "2026-08-23T19:18:15.132Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
        "shortName": "CPANSec",
        "dateUpdated": "2026-08-23T19:18:15.132Z"
      },
      "title": "Apache::AppSamurai::Util versions through 1.01 for Perl generate predictable session authentication keys from the clock and process id in CreateSessionAuthKey",
      "descriptions": [
        {
          "lang": "en",
          "value": "Apache::AppSamurai::Util versions through 1.01 for Perl generate predictable session authentication keys from the clock and process id in CreateSessionAuthKey.\n\nCreateSessionAuthKey runs five rounds of SHA-256, each over a fresh Time::HiRes reading formatted to six decimal places, the running digest, and the process id. CreateSession calls it with an empty key source on every login, and the optional Keysource directive is the only route to the other branch. The result is 64 hex characters. The microsecond field of the first reading takes one of a million values, the later readings follow it within microseconds, and the process id is drawn from a small range.\n\nThe key is returned to the browser as the session cookie, and is combined with the configured server key to compute the session id and to encrypt the stored session data. An attacker who knows the second in which a session was created and the process id of the worker that created it can enumerate candidate keys and recover the victim's cookie, bypassing authentication for the protected resources. Each candidate has to be tried against the server, which validates the cookie with a key the attacker does not hold."
        }
      ],
      "affected": [
        {
          "collectionURL": "https://cpan.org/modules",
          "packageName": "Apache-AppSamurai",
          "modules": [
            "Apache::AppSamurai::Util"
          ],
          "programFiles": [
            "lib/Apache/AppSamurai/Util.pm",
            "lib/Apache/AppSamurai.pm"
          ],
          "programRoutines": [
            {
              "name": "Apache::AppSamurai::Util::CreateSessionAuthKey"
            },
            {
              "name": "Apache::AppSamurai::CreateSession"
            }
          ],
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "0",
              "status": "affected",
              "versionType": "custom",
              "lessThanOrEqual": "1.01"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-341 Predictable from Observable State",
              "cweId": "CWE-341",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://metacpan.org/release/PAULDOOM/Apache-AppSamurai-1.01/source/lib/Apache/AppSamurai/Util.pm#L106-135",
          "tags": [
            "related"
          ]
        },
        {
          "url": "https://metacpan.org/release/PAULDOOM/Apache-AppSamurai-1.01/source/lib/Apache/AppSamurai.pm#L1446-1533",
          "tags": [
            "related"
          ]
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-59",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-59 Session Credential Falsification through Prediction"
            }
          ]
        },
        {
          "capecId": "CAPEC-115",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-115 Authentication Bypass"
            }
          ]
        }
      ],
      "workarounds": [
        {
          "lang": "en",
          "value": "Apache::AppSamurai has not been released since 2008.\n\nUsers should migrate to an alternative solution."
        }
      ]
    },
    "adp": [
      {
        "providerMetadata": {
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE",
          "dateUpdated": "2026-08-23T22:05:03.347Z"
        },
        "title": "CVE Program Container",
        "references": [
          {
            "url": "http://www.openwall.com/lists/oss-security/2026/08/23/4"
          }
        ]
      }
    ]
  }
}