Locations
Summary
Survey forms can retain the previous operator's answers while their mutation hooks have already rebound to a newly selected operator. Submitting during the new query's loading interval writes the stale answers to the new operator.
Root cause
The forms hydrate React Hook Form with values: data but gate rendering on formObject.formState.isLoading, not the survey query's loading state. When the active operator changes, the new query temporarily supplies undefined; React Hook Form 7.80 retains its existing values, while useOperatorSurvey immediately targets the new operator key.
Impact
A wallet controlling multiple operators can overwrite the newly selected operator's contacts, experience, discovery-source answers, or same-index setup with values reviewed under the previous operator. The result is correctable off-chain survey-data corruption without an on-chain effect, so severity is low.
Scenario
- A wallet controls operators A and B and opens A's contact survey.
- The user selects B through the global operator switch, which leaves the current route mounted.
- B's survey query begins loading, but A's values and the active submit control remain rendered.
- The user submits before B's response hydrates the form.
- The request uses B's operator key with A's retained contact payload, overwriting B's record.
Drafted from LidoLens finding SURVEY-DATA-03
Locations
csm-widget/features/surveys/survey-contacts/survey-contacts.tsx:60-72csm-widget/features/surveys/survey-experience/survey-experience.tsx:55-66csm-widget/features/surveys/survey-how-did-you-learn-csm/survey-how-did-you-learn-csm.tsx:50-59csm-widget/features/surveys/survey-setup/survey-setup.tsx:69-85Summary
Survey forms can retain the previous operator's answers while their mutation hooks have already rebound to a newly selected operator. Submitting during the new query's loading interval writes the stale answers to the new operator.
Root cause
The forms hydrate React Hook Form with
values: databut gate rendering onformObject.formState.isLoading, not the survey query's loading state. When the active operator changes, the new query temporarily suppliesundefined; React Hook Form 7.80 retains its existing values, whileuseOperatorSurveyimmediately targets the new operator key.Impact
A wallet controlling multiple operators can overwrite the newly selected operator's contacts, experience, discovery-source answers, or same-index setup with values reviewed under the previous operator. The result is correctable off-chain survey-data corruption without an on-chain effect, so severity is low.
Scenario
Drafted from LidoLens finding SURVEY-DATA-03