Skip to content

Security: Unsanitized code injection in buildConditionalExpression (CVE-2025-4318 sibling) #1205

Description

@leanworld7-netizen

AWS Amplify Codegen UI - Unsanitized Code Injection in buildConditionalExpression (CVE-2025-4318 Sibling)

Summary

The buildConditionalExpression function in react-component-render-helper.ts passes user-controlled property and field values from ConditionalStudioComponentProperty.condition directly to factory.createIdentifier() without calling escapePropertyValue() or any sanitization. This is the same vulnerability class as CVE-2025-4318 (GHSA-hf3j-86p7-mfw8) but in a different code path that was missed by all three fix commits.

Affected Code

File: packages/codegen-ui-react/lib/react-component-render-helper.ts, lines 615-647

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions