
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
const json_xml = require('json_xml')
var jsonObj = json_xml.xml2json(xmlStr)
<xml>
<appid>wx2421b1c4370ec43b</appid>
<attach><![CDATA[attach1]]></attach>
<attach>attach2</attach>
<bank_type>1</bank_type>
<sign></sign>
<fee_type><is_subscribe><![CDATA[Y]]></is_subscribe></fee_type>
</xml>
{ xml:
{ appid: 'wx2421b1c4370ec43b',
attach: [ 'attach1', 'attach2' ],
bank_type: '1',
sign: '',
fee_type: { is_subscribe: 'Y' } } }
<?xml version="1.0" encoding="utf-8"?>
<ROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="JobSendedDescription">
<RetCode>Sucess</RetCode>
<JobID>159142093</JobID>
<OKPhoneCounts>1</OKPhoneCounts>
<StockReduced>1</StockReduced>
<ErrPhones />
</ROOT>
{ ROOT:
{ RetCode: 'Sucess',
JobID: '159142093',
OKPhoneCounts: '1',
StockReduced: '1',
ErrPhones: '' } }
const json_xml = require('json_xml')
var jsonObj = json_xml.xml2json(jsonObj)
{ xml:
{ appid: 'wx2421b1c4370ec43b',
attach: [ 'attach1', 'attach2' ],
bank_type: '1',
sign: '',
fee_type: { is_subscribe: 'Y' } } }
<xml>
<appid><![CDATA[wx2421b1c4370ec43b]]></appid>
<attach><![CDATA[attach1]]></attach>
<attach><![CDATA[attach2]]></attach>
<bank_type><![CDATA[1]]></bank_type>
<sign><![CDATA[]]></sign>
<fee_type>
<is_subscribe><![CDATA[Y]]></is_subscribe>
</fee_type>
</xml>
const express = require('express')
const app = express()
const app = express()
app.use(json_xml.middleware)
app.post('/', (req, res) => {
console.log(req.rawBody) // XML
console.log(req.body) // JSON
res.send('success')
})
FAQs
1.xml to json; 2.json to xml; 3.express middleware
We found that json_xml demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.