The Billion Laughs DoS attack seems preventable by simply stopping entities in XML files from being expanded. Is there a way to do this in Python's xlrd library (i.e. a flag of some sort)? If not, is there a recommended way to avoid the attack?
How to prevent "billion laughs" DoS attack in Python's xlrd?
2.6k Views Asked by Cisplatin At
1
There are 1 best solutions below
Related Questions in PYTHON
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
- python how to write list of lists to file
- Removing URL features from tokens in NLTK
- Optimizing for Social Leaderboards
- Python : Get size of string in bytes
- What is the code of the sorted function?
Related Questions in XML
- Impose component restriction to a series of parsys-CQ
- Wrong xml being inflated android
- Shorten the XSD
- Writing/Overwriting to specific XML file from ASP.NET code behind
- Magento custom block. Can't get block's file
- Layout not shifting up when keyboard is open
- CSV to XML XSLT: How to quote excape
- Getting deeply embedded XML element values
- Saving FileSystemInfo Array to File
- how to apply templates within xsl:for-each
- Spring - configure Jboss Intros for xml with java config?
- Problems with implementing custom actionbar android
- Can Apache Ant be told to cache its XML files?
- Is Log4j2 xml configuration case sensitive?
- How to get a specific node value in XML Pull Parser
Related Questions in XLSX
- how to use xlsx library to parse excel files within the browser
- How to get header and data from Models in Python?
- How to avoid out of memory exception in case of reading large .xlsx file in java using apache poi library class XSSFWorkbook
- AngularJS ui-grid import XLSX data best approach
- How to read data one by one from excel sheet in node.js
- How to set custom header names with ALASQL and XLSX
- How to get around Run-time Error 1004
- Dynamically converting a list of Excel files to csv files in R
- Print/save Excel (.xlsx) sheet to PDF using R
- XLS file created using XML format shown XML data in OpenOffice.org Calc and share on Google Drive
- Parse XLSX with Node and create json
- SaveAs function when saving to excel from Python
- How do I include empty columns when reading an xlsx spreadsheet into R?
- Open shift strange NPM issue - Module not found though installed
- phpexcel not reading sheet correctly
Related Questions in XLRD
- Read merged cells in Excel with Python
- xlrd cell value returns error
- Downloading data from two Worksheets of a URL with an Excel File
- Python: How to handle excel data from web without saving file
- How to Extract Multiple Columns from Excel into an array
- Preventing csvkit from modifying dates/times?
- How to use python to collapse rows in already existing excel sheet?
- How do I read/write both xlsx and xls files in Python?
- SaveAs function when saving to excel from Python
- Specify filename in python script to open Excel workbook
- Convert xlsm to csv
- How to take value from one cell and add to list over multiple excel files
- Pycharm, importError no module name, when using os.system
- 'float' object is not iterable typerror
- How do I run spreadsheet data-driven webriver code without it being in a massive for loop?
Related Questions in CLIENT-SIDE-ATTACKS
- Javascript store client-side password across pages in memory
- Avoid remote website inclusion
- Client side securing token vulnerability circular dilemma
- How to prevent hackers from modifying the product price in e-commerce
- How to abuse XSS with specific criteria or filters?
- Making a Chrome plug-in of Suricata/Snort for intrusion detection on client side
- How to prevent "billion laughs" DoS attack in Python's xlrd?
- How to trigger xss with html encoded xss attack vector inside script tags?
- What are the things that need to be considered while deleting a resource through api
- XSS PoC: Hide Rendered Characters in DOM
- Does somebody knows about this: repo1.criticalnumeric.tech
- Ways to secure API that do not require authentication, to be called only from one pre-defined consumer
- Why a well anti flood protection for my website redirects in strange cases?
- Cross site attack warning each time I open Firefox
- How to protect AJAX or javascript web application
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Not with xlrd by itself
There is no option in xlrd at this time for preventing any sort of XML bomb. In the source code, the xlsx data is passed to python's built-in
xml.etreefor parsing without any validation:However, it may be possible to patch
ElementTreeusing defusedxmlAs noted in the comments, defusedxml is a package targeted directly at the problem of security against different types of XML bombs. From the docs:
It also provides the functionality of patching the standard library. Since that is what xlrd is using, you are able to use the combination of xlrd and defusedxml to read Excel files while protecting yourself from XML bombs.