Excel file import error: caused by: IOException: Zip bomb detected!

Solved!
Oh_Lily
Level 2
Excel file import error: caused by: IOException: Zip bomb detected!

Hello, 
I am trying to import an excel file in my flow and I get this error: 
Tried format excel but configuration is not OK: Failed to open Excel file, caused by: OpenException: Failed to open file, caused by: IOException: Zip bomb detected! The file would exceed the max. ratio of compressed file size to the size of the expanded data. This may indicate that the file is used to inflate memory usage and thus could pose a security risk. You can adjust this limit via ZipSecureFile.setMinInflateRatio() if you need to work with files which exceed this limit. Uncompressed size: 515868, Raw/compressed size: 5120, ratio: 0.009925 Limits: MIN_INFLATE_RATIO: 0.010000, Entry: xl/styles.xml

Any sugestions please anyone ? 
Thank you in advance 


Operating system used: Windows

0 Kudos
1 Solution
CatalinaS
Dataiker

Hi @Oh_Lily,

 

The message shows the error "Zip bomb detected" which refers to an attack vector in which a small zip file expands to an extremely large size when uncompressed to the point that it exhausts server resources - https://stackoverflow.com/a/44900653.

Unfortunately this file cannot be read using DSS, as the setting of the excel parsing library that controls the max allowed compression (i.e. ZipSecureFile.setMinInflateRatio()) ratio isnโ€™t settable from the DSS UI.

โ€‹The solution to this issue is to open the file in Excel, export as a CSV, and then import the CSV into DSS.

โ€‹

View solution in original post

2 Replies
CatalinaS
Dataiker

Hi @Oh_Lily,

 

The message shows the error "Zip bomb detected" which refers to an attack vector in which a small zip file expands to an extremely large size when uncompressed to the point that it exhausts server resources - https://stackoverflow.com/a/44900653.

Unfortunately this file cannot be read using DSS, as the setting of the excel parsing library that controls the max allowed compression (i.e. ZipSecureFile.setMinInflateRatio()) ratio isnโ€™t settable from the DSS UI.

โ€‹The solution to this issue is to open the file in Excel, export as a CSV, and then import the CSV into DSS.

โ€‹

Oh_Lily
Level 2
Author

It worked with a CSV file! 
Thank you :)) 

0 Kudos