CVE-2025-54125: Brittle Xml Regex Redaction

Redacting sensitive information in XML or structured text using string replacements or regular expressions is brittle. It fails to redact sensitive data stored in properties with different names not covered by the exact regex. Rely on structured serialization APIs to exclude sensitive properties before building the output.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Javaβ
greprules fetch cve-2025-54125-brittle-xml-regex-redaction --engine opengrep

Description

Redacting sensitive information in XML or structured text using string replacements or regular expressions is brittle. It fails to redact sensitive data stored in properties with different names not covered by the exact regex. Rely on structured serialization APIs to exclude sensitive properties before building the output.