# Handling zip/apk files with many nested levels by tika-mapper-attachments

**URL:** <https://discuss.elastic.co/t/handling-zip-apk-files-with-many-nested-levels-by-tika-mapper-attachments/10458>\
**Category:** Elasticsearch\
**Created:** [January 22, 2013, 6:13pm UTC](https://discuss.elastic.co/t/handling-zip-apk-files-with-many-nested-levels-by-tika-mapper-attachments/10458 "2013-01-22T18:13:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nordsee](https://avatars.discourse-cdn.com/v4/letter/n/e5b9ba/32.png) [@nordsee](https://discuss.elastic.co/u/nordsee)\
**Post date:** [January 22, 2013, 6:13pm UTC](https://discuss.elastic.co/t/handling-zip-apk-files-with-many-nested-levels-by-tika-mapper-attachments/10458/1 "2013-01-22T18:13:39Z")

</div>

Hi,

if I try to index an apk file, tika tries to extract it and throws the  
following exception:

{"error":"MapperParsingException[Failed to extract [100000] characters of  
text for [null]]; nested: TikaException[Zip bomb detected!]; nested:  
SecureSAXException[Suspected zip bomb: 10 levels of package entry nesting];  
","status":400}

Can I somewhere increase the allowed depth of levels? Or can I somehow  
prevent extracting files with high nesting levels in order to avoid this  
exception?

I'm using elasticsearch 0.20.2 and mapper-attachments 1.6.0

--

---

<div class="post-metadata">

**Author:** ![nordsee\_2](https://avatars.discourse-cdn.com/v4/letter/n/77aa72/32.png) [@nordsee\_2](https://discuss.elastic.co/u/nordsee_2)\
**Post date:** [April 14, 2013, 10:10pm UTC](https://discuss.elastic.co/t/handling-zip-apk-files-with-many-nested-levels-by-tika-mapper-attachments/10458/2 "2013-04-14T22:10:22Z")

</div>

Same problem still exists in elasticsearch 0.20.6. Does anybody have an  
idea how to avoid this?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 15, 2013, 6:26am UTC](https://discuss.elastic.co/t/handling-zip-apk-files-with-many-nested-levels-by-tika-mapper-attachments/10458/3 "2013-04-15T06:26:31Z")

</div>

Hey,

you cannot configure that in elasticsearch, To be honest, I am not sure, if  
this can be configured upstream in Tika (where the exception occurs from),  
see  
[https://issues.apache.org/jira/browse/TIKA-860](https://issues.apache.org/jira/browse/TIKA-860)  
[https://issues.apache.org/jira/browse/TIKA-741](https://issues.apache.org/jira/browse/TIKA-741)

if you find another solution, please put it here as well 🙂

On Mon, Apr 15, 2013 at 12:10 AM, nordsee [hullmann.arne@googlemail.com](mailto:hullmann.arne@googlemail.com)wrote:

> Same problem still exists in elasticsearch 0.20.6. Does anybody have an  
> idea how to avoid this?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:41am UTC](https://discuss.elastic.co/t/handling-zip-apk-files-with-many-nested-levels-by-tika-mapper-attachments/10458/4 "2017-07-06T02:41:10Z")

</div>


