Did You Know That Your Apache Spark Logs Might Be Leaking Piis
Apache Spark query plans include hardcoded filter values, so sensitive data such as email addresses can appear in logs and the Spark UI. An attacker with access to these logs could read personal information.
Published on systemweakness.com
Working with sensitive dataset that contains PIIs (Personal Identifiable Information) such as users tables, require plenty of precautions to make sure our customers personal data is safe.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely Spark does not parameterise queries, so literal values are embedded in the query plan and some parts of the plan are not redacted.
Impact
An attacker with access to Spark logs or the Spark UI could read personal information such as email addresses.
What the attacker needed
Access to Spark logs or UI
The fix
Use a user-defined function for filtering so the value is not part of the query plan, or avoid querying by sensitive fields altogether.
How it was found
- Create a Spark job that filters a dataset by a specific email address.
- Run the job and observe that the email appears in the query plan output.
- Check the Spark UI or history server SQL page to see the email in the plan.
- Hover over a SQL node to view additional metadata that also contains the email.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you run a query in Apache Spark, the system writes down the exact query, including any specific values you used to filter data. If those values are personal details like email addresses, they end up in logs and monitoring tools that many people can see. This means private information can leak without anyone breaking in.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.