Skip to content

[TagAwareCipher] - Decryption Failure (Regex Match)

Low severity GitHub Reviewed Published Mar 16, 2024 in IlicMiljan/Secure-Props • Updated Mar 19, 2024

Package

composer ilicmiljan/secure-props (Composer)

Affected versions

>= 1.2.0, < 1.2.2

Patched versions

1.2.2

Description

Impact

Vulnerability in SecureProps involves a regex failing to detect tags during decryption of encrypted data.

This occurs when the encrypted data has been encoded with NullEncoder and passed to TagAwareCipher, and contains special characters such as \n. As a result, the decryption process is skipped since the tags are not detected. This causes the encrypted data to be returned in plain format.

The vulnerability affects users who implement TagAwareCipher with any base cipher that has NullEncoder (not default).

Patches

The patch for the issue has been released. Users are advised to update to version 1.2.2.

Workarounds

The main recommendation is to update to the latest version as there are no breaking changes.

If that's not possible, you can use the default Base64Encoder with the base cipher decorated with TagAwareCipher to prevent special characters in the encrypted string from interfering with regex tag detection logic.

This workaround is safe but may involve double encoding since TagAwareCipher uses Base64Encoder by default.

References

Reported issue: IlicMiljan/Secure-Props#20
Pull request resolving bug: IlicMiljan/Secure-Props#21

References

@IlicMiljan IlicMiljan published to IlicMiljan/Secure-Props Mar 16, 2024
Published to the GitHub Advisory Database Mar 18, 2024
Reviewed Mar 18, 2024
Published by the National Vulnerability Database Mar 18, 2024
Last updated Mar 19, 2024

Severity

Low
2.6
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N

Weaknesses

CVE ID

CVE-2024-28864

GHSA ID

GHSA-rj29-j2g4-77q8

Credits

Checking history
See something to contribute? Suggest improvements for this vulnerability.