Vulnerability DatabaseGHSA-h38w-h2gf-6qv2

GHSA-h38w-h2gf-6qv2: 
PHP vulnerability analysis and mitigation

Summary

OTP::validateLabel() must refuse a label whose issuer or account name contains a colon (:, %3A or %3a) besides the single separator. Before it looks for that second colon, it strips the optional leading %20 of the account name with ltrim($accountPart, '%20'). ltrim() takes a list of characters, not a prefix, so it removes every leading %, 2 and 0. For Provider:%3Aname the check sees 3Aname and accepts the label, while Provider:x%3Aname is rejected.

Impact

A label like this can be stored instead of being refused with the documented InvalidLabelException (or InvalidProvisioningUriException from the factory). That applies to whoever supplies a provisioning URI to Factory::loadFromProvisioningUri(), with label=Provider%3A%253Aname in the query or Provider%253A%253Aname in the path. It also applies to whoever supplies an account name that the application passes to setLabel() or withLabel(). Inside the library the effect is nil. The %3A is never decoded. getProvisioningUri() and getQrCodeUri() refuse any label that contains a colon. at(), now() and verify() do not use the label. An application is affected only if it percent-decodes the value returned by getLabel() and relies on the library's colon rule to split the issuer from the account name.

Affected component

  • src/OTP.php:464 in 11.4.3, src/OTP.php:489 in 11.5.0: the ltrim($accountPart, '%20') call in OTP::validateLabel() Introduced in 11.4.0 (commit d3593de, "Fix label validation to comply with Google Authenticator spec (#248)").

Proof of concept

use OTPHP\HOTP;
$otp = HOTP::createFromSecret('JBSWY3DPEHPK3PXP');
$otp->setLabel('Provider:x%3Aname'); // InvalidLabelException, as expected
$otp->setLabel('Provider:%3Aname');  // accepted

Remediation

Fixed in 11.4.4 and 11.5.1: the account part is now checked without the trim. Labels that were valid, such as Provider:%20name or Provider:2020, are still accepted.

Workarounds

Do not percent-decode the label returned by getLabel(), or validate the decoded value in the application.

Credits

Reported by Anthropic's OSS Scanner (finding ANT-2026-A3E01AZK).


Source: NVD

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-122053MEDIUM6.9
  • PHP logoPHP
  • symfony/serializer
NoYesNov 06, 2026
GHSA-526c-px8p-72x8MEDIUM4.3
  • PHP logoPHP
  • spomky-labs/otphp
NoYesNov 07, 2026
CVE-2026-123824LOW2.3
  • PHP logoPHP
  • symfony/config
NoYesNov 06, 2026
GHSA-h38w-h2gf-6qv2LOWN/A
  • PHP logoPHP
  • spomky-labs/otphp
NoYesNov 07, 2026
GHSA-4v5c-4hwq-6f6mMEDIUMN/A
  • PHP logoPHP
  • spomky-labs/otphp
NoYesNov 07, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management