Jump to content
We've recently updated our Privacy Statement, available here ×

Preventing CSV injection


asookaziangmail.com

Recommended Posts

With Jasper Reports library 6.17.0 (latest) it seems there is no way to prevent and/or mitigate potential CSV injection attacks.  

What is the best practice guidance here regarding CSV injection?  Is it supported in 6.x or not?  If yes, how to implement/configure?  In consideration are formula values (e.g. =HYPERLINK(xxx) or =cmd(xxx)) from database query; we want only these types of values as per a regex pattern to be "deactivated" as formulas when the csv is opened in Excel.

The CSV exporter config in SimpleCsvExporterConfiguration for setForceFieldEnclosure does not seem to solve this problem, it simply surrounds all CSV values with a specific character (default is double quote).

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...