Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@coco-vexel/coco-office-oojson

Latest version: v1.0.16

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: halvee-tech
6 Stars
0 Forks
18 Versions
2.2K Downloads
TypeScript Repo language

Scan summary

@coco-vexel/coco-office-oojson was last scanned on 27 Nov 2026 at version 1.0.16. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 18 versions; the latest 4 were published within 4 days (24–27 Nov 2026).
  • Findings: No rules fired in version 1.0.16.
  • Downloads: 2,204 downloads.

Versions

18 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.16 LATEST 27 Nov 2026 No rules fired
1.0.15 27 Nov 2026 No rules fired
1.0.14 25 Nov 2026 No rules fired
1.0.13 24 Nov 2026 Not shown
1.0.12 20 Nov 2026 Not shown

No rules fired in 1.0.16

Findings

Findings for v1.0.16. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.16; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@coco-vexel/coco-office-oojson

ONLYOFFICE-shaped JSON ↔ Word OOXML / Flat OPC conversion, plus PPT content/deck adapters. This is a conversion library, not an ONLYOFFICE server, editor or Excel JSON converter.

Install and runtime

After the initial npm release: npm install @coco-vexel/coco-office-oojson.

ESM JavaScript for Node.js and browser bundlers. It depends on @coco-vexel/coco-office. The initial release has no TypeScript declaration files or CommonJS entry. @coco-vexel/coco-office-oojson/browser-global ships an IIFE exposing oojson for a script host; it is not an ESM API entry. No Office application is required for pure conversion.

import { jsonToOoxml, ooxmlToJson, jsonToFlatOpc } from '@coco-vexel/coco-office-oojson';
const document = {
  type: 'document',
  content: [
    {
      type: 'paragraph',
      pPr: {},
      content: [{ type: 'run', rPr: {}, content: ['Hello'] }],
    },
  ],
};
const xml = jsonToOoxml(document);
const { doc, gaps } = ooxmlToJson(xml);
const flatOpc = jsonToFlatOpc(document);

Create a DOCX and inspect writeback diagnostics

If you directly import Core as in this example, declare it in your application too:

npm install @coco-vexel/coco-office-oojson @coco-vexel/coco-office

Save the following as convert.mjs, then run node convert.mjs with Node.js 22 or 24. It needs no input file and writes converted.docx. The exclusive write flag prevents overwriting an existing file. Browser bundlers can use the same conversion calls, replacing Node file I/O with Blob downloads.

import { writeFile } from 'node:fs/promises';
import {
  jsonToFlatOpc,
  jsonToOoxml,
  ooxmlToJson,
  flatOpcToOnlyOfficeWriteback,
} from '@coco-vexel/coco-office-oojson';
import { fromFlatOpc, toZip } from '@coco-vexel/coco-office/pack';

const input = {
  type: 'document',
  content: [
    {
      type: 'paragraph',
      pPr: {},
      content: [{ type: 'run', rPr: {}, content: ['Hello OOJSON'] }],
    },
  ],
};
const { doc, gaps } = ooxmlToJson(jsonToOoxml(input));
if (gaps.size) throw new Error(`Unmapped XML: ${JSON.stringify(gaps.top())}`);
const flatOpc = jsonToFlatOpc(input);
const result = flatOpcToOnlyOfficeWriteback(flatOpc);
if (result.diagnostics.unsupportedDomains.length) {
  throw new Error(`Unsupported writeback: ${JSON.stringify(result.diagnostics.unsupportedItems)}`);
}
console.log('Returned document:', doc);
console.log('Writeback warnings:', result.diagnostics.warnings);
await writeFile('converted.docx', await toZip(fromFlatOpc(flatOpc)), { flag: 'wx' });

jsonToOoxml() returns a Word document.xml string; it does not return ZIP bytes. jsonToFlatOpc() returns an XML package string. toZip(fromFlatOpc(...)) creates DOCX bytes. ooxmlToJson() returns { doc, gaps }, not the document directly. JSON conversion and writeback planning are synchronous; ZIP I/O is asynchronous.

flatOpcToOnlyOfficeWriteback() prepares a body plus gap information and diagnostics; it does not mutate a live editor. A separate host adapter must apply these using the correct ONLYOFFICE host APIs and report failures. gaps.size === 0 is not proof that every unsupported package feature can be written back; inspect both conversion gaps and writeback diagnostics.

For a script-tag host, copy the installed dist/oojson.global.js to your static assets and load it with <script src="/assets/oojson.global.js"></script>; functions are available on globalThis.oojson. Do not expect named ESM exports from the /browser-global entry. Host scripts and DOM access remain your application's responsibility.

API groups and limits

  • Word body: jsonToOoxml, ooxmlToJson, Gaps; paragraphs, runs, tables and supported formatting. Private extension data preserves otherwise unmapped JSON fields where implemented; this does not guarantee arbitrary DOCX fidelity.
  • Word package: jsonToFlatOpc, jsonToFlatOpcWithStyles, buildStylesXml, buildNumberingXml, default theme/font/settings parts and withPackageLongTailParts.
  • Writeback preparation: flatOpcToOnlyOfficeWriteback returns bodyJson, gaps and diagnostics (warnings, unsupportedDomains, unsupportedItems). A host adapter must apply the body and check diagnostics; the library does not call ONLYOFFICE APIs itself.
  • PPT: ONLYOFFICE text content ↔ Core text bodies; deck ↔ Core models; supported text/style/model updates. Advanced geometry, charts, animations and layout are not covered by a blanket fidelity claim.
  • Long-tail limits include complex drawings/wrapping, threaded comments, picture bullets and theme effects. See implementation notes.

Runnable verification

From the repository root after install/build:

node examples/oojson-roundtrip.mjs
corepack pnpm --filter @coco-vexel/coco-office-oojson test:portable
corepack pnpm demo

Open /oojson.html from the demo URL for a synthetic text conversion and round-trip check. The Node example also crosses Core Flat OPC/ZIP and writeback boundaries. Neither requires DocumentBuilder or a private corpus.

Optional host fidelity checks use DOCBUILDER_EXE and test:ooxml; a live ONLYOFFICE editor and its external adapter are needed to validate actual ToJSON/FromJSON execution. These are not prerequisites for installing this npm package.

Apache-2.0; see LICENSE and THIRD_PARTY_NOTICES.md. Core is a separate runtime dependency; its attribution is also included for the bundled browser-global artifact.

Report reproducible conversion issues with package version, synthetic input JSON and diagnostics at GitHub Issues. Do not attach customer files or account metadata.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @coco-vexel/coco-office-oojson

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229