Intel

AIKIDO-2026-503347

spomky-labs/pki-framework is vulnerable to Regular Expression Denial of Service (ReDoS)

Regular Expression Denial of Service (ReDoS)GHSA-x673-qv99-7268 Published 5 days ago

53

Medium Risk

This Affects:

PHPspomky-labs/pki-framework
0.0.1 - 1.6.1
Fixed in 1.6.2
Are you affected? Scan for Free

TL;DR

PEM_REGEX in PEM.php uses unanchored lazy groups, so repeated -----BEGIN lines with no matching -----END marker cause cubic backtracking. PEM::fromString() and PEMBundle::fromString() run this regex on user supplied certificate or bundle text. A few kilobytes of this text use far more CPU than parsing thousands of real certificates. The fix anchors the pattern and allows only base64 content on single line labels.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you parse PEM certificate or bundle text from an untrusted source.

Background info

spomky-labs/pki-framework is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 0.0.1 - 1.6.1.

How to fix this

Upgrade the spomky-labs/pki-framework library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform