Summary
A SQL injection flaw in Crocus v1.3.44 allows crafted input to be passed into database queries without proper sanitization through the RecordStateMapper.xml component.
Under typical web deployment, a remote attacker can leverage this injection to run arbitrary SQL, enabling privilege escalation and full application data compromise.
Affected context
The vulnerability manifests in Crocus installations that rely on RecordStateMapper.xml to drive dynamic database operations based on user-controlled or externally sourced parameters.
It is most relevant where XML-configured query mappings are used to construct SQL statements at runtime and where input validation or parameterization is either incomplete or inconsistently applied.
Exploit preconditions
- Attack surface: Interfaces or workflows that ultimately invoke queries defined or influenced by RecordStateMapper.xml (e.g., web endpoints, APIs, or background tasks consuming user data).
- Required access: Remote ability to submit or influence request parameters or data fields that flow into the mapped SQL statements.
- Trigger point: Execution of a database query whose structure or WHERE clause is assembled using untrusted values without strict parameter binding.
- Why exploitation is possible: The XML-driven mapping enables raw concatenation of unvalidated input into SQL, violating the separation between data and code and matching CWE-89.
Why this happens
At its core, this vulnerability arises from constructing SQL statements using string concatenation or equivalent dynamic interpolation rather than safe, parameterized queries.
RecordStateMapper.xml appears to carry query templates or logic fragments that are populated directly with untrusted values, allowing attackers to break out of intended query structure.
This pattern aligns with CWE-89: SQL Injection, where application code fails to treat user-controlled data as purely data and instead allows it to alter executable SQL logic.
Potential impact
- An attacker may escalate privileges within the application by modifying authentication or authorization data.
- An attacker could read sensitive tables, including credentials, personal information, or business records.
- An attacker may alter or delete application data, corrupting state or destroying logs.
- An attacker could create or modify administrative accounts or roles.
- An attacker may leverage database-level functions for further system compromise, depending on DB configuration.
General mitigation guidance
Effective mitigation focuses on ensuring that data is never allowed to change SQL structure.
Recommended design patterns include:
- Using parameterized queries or prepared statements for all database interactions, including those defined via XML or configuration files.
- Refactoring XML-based query mappings so they express only static query skeletons with bound parameters, avoiding dynamic string assembly.
- Centralizing input validation and normalization to reduce trust in any external data source.
- Applying least-privilege to database accounts so that even if injection occurs, the scope of what the attacker can do is constrained.
- Favoring ORM or query-builder abstractions that default to safe parameterization over manual SQL construction.
How teams detect issues like this
Detection typically combines code-focused and configuration-focused review:
- Static analysis rules that flag string concatenation in SQL-building code paths and usage of unsafe APIs, particularly where RecordStateMapper.xml is parsed.
- Configuration review of XML mapping files to identify placeholders or tokens that are directly substituted into SQL rather than mapped to bound parameters.
- Manual code review emphasizing data flow tracing from HTTP/API inputs through mapping layers into database calls.
- Policy-based checks in CI/CD pipelines that reject changes introducing unparameterized queries or dynamic SQL with untrusted values.
- Optional use of automated SAST/DAST tools to identify exploitable injection points in running deployments.

