GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Using complex arrays as map keys may hang the process · Issue #475 · nodeca/js-yaml

Using complex arrays as map keys may hang the process #475

New issue
Copy link
New issue
Copy link
Closed
Closed
Using complex arrays as map keys may hang the process#475
Copy link
Labels
bug

Description

@rlidwka
rlidwka
opened on Mar 20, 2019
Issue body actions

Arrays can be yaml keys. Arrays can be arbitrarily nested data structures that can reference each other. Yaml keys are serialized into strings.

As a result, we have a possibility of user creating yaml that will cause map key to grow exponentially from linearly growing input.

? - &c
    - &a 1
    - &b 2
  - &d
    - *a
    - *b
: key

expands into { "1,2,1,2": "key" }

?
  - &e
    - &c
      - &a 1
      - &b 2
    - &d
      - *a
      - *b
  - &f
    - *c
    - *d
: key

expands into { "1,2,1,2,1,2,1,2": "key" }

?
  - &g
    - &e
      - &c
        - &a 1
        - &b 2
      - &d
        - *a
        - *b
    - &f
      - *c
      - *d
  - &h
    - *e
    - *f
: key

expands into { "1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2": "key" }

Which is doubling the output, with only linearly growing input... and so on. Give it 30 levels of nesting, you'll get 1GB worth of data out of 10kB input file.

relevant issue here: #169

Reacted by karaeren

Activity

  1. puzrin
    added
    bug
    on Mar 20, 2019
  2. rlidwka
    added a commit that references this issue on Mar 20, 2019

    Restrict data types for object keys

    This issue will close once commit a567ef3 is merged into the 'master' branch.
    a567ef3
  3. rlidwka
    closed this as completedin a567ef3on Mar 20, 2019
  4. cappadona
    added 2 commits that reference this issue on Jun 6, 2019

    Bump to [email protected]

    d9013fc

    Bump to [email protected] (#993)

    107f348
  5. facebook-github-bot
    added a commit that references this issue on Jun 7, 2019

    yarn upgrade --deep (#2758)

    966fbdc
  6. poveden
    added a commit that references this issue on Jun 7, 2019

    Update npm dependencies

    6d970bf
  7. billchurch
    added 2 commits that reference this issue on Jun 13, 2019

    update js-yaml to 3.13.1 for secuirty issue

    6e79091

    Missing require('fs') in `server/app.js` See issue [#135](../../issue…

    56086b0
  8. maxpou
    added a commit that references this issue on Jun 14, 2019

    chore(package.json): bump dependencies (#59)

    89c13c5
  9. simonwiles
    added a commit that references this issue on Jul 3, 2019

    Upgrade `js-yaml` to ^3.13.1

    e270f4b
  10. gflohr
    added a commit that references this issue on Jul 11, 2019

    update js-yaml

    5fe97c3
  11. krubenok
    added a commit that references this issue on Jul 13, 2019

    Update js-yaml for Security Reasons

    0f77157
  12. jacobherrington
    added a commit that references this issue on Jul 22, 2019

    Bump js-yaml for security issue

    a86bdfc
  13. vBm
    added a commit that references this issue on Aug 21, 2019

    Security: rehash lock file

    b729da8
  14. rjpaskin
    added a commit that references this issue on Sep 6, 2019

    Upgrade ys-yaml

    02bca9f
  15. alxndr
    added a commit that references this issue on Oct 22, 2019

    update webpack dependencies

    6b38c33
  16. sindilevich
    added a commit that references this issue on Jan 18, 2020

    Updated third-party dependencies

    e95b0fe
  17. luxuryluke
    added a commit that references this issue on Jan 28, 2020

    vulnerable dependancies

    9ba76b9
  18. hktalent
    added 2 commits that reference this issue on Jun 3, 2022

    Missing require('fs') in `server/app.js` See issue [billchurch#135](.…

    8caff42

    Missing require('fs') in `server/app.js` See issue [billchurch#135](.…

    a8c8b7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.