Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2024-39908 DoS in REXML #5180

Open
23tux opened this issue Jul 17, 2024 · 1 comment
Open

CVE-2024-39908 DoS in REXML #5180

23tux opened this issue Jul 17, 2024 · 1 comment

Comments

@23tux
Copy link

23tux commented Jul 17, 2024

REXML has a CVE

I tried updating REXML to 3.3.2 in my fork, but when running the tests I get errors like this

Error: test_failed_create_profile(PaypalTest):
  REXML::ParseException: Malformed XML: Extra content at the end of the document (got '"
  ')
  Line: 28
  Position: 2305
  Last 80 unconsumed characters:
/Users/user/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rexml-3.3.2/lib/rexml/parsers/baseparser.rb:487:in `pull_event'
/Users/user/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rexml-3.3.2/lib/rexml/parsers/baseparser.rb:225:in `pull'
/Users/user/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rexml-3.3.2/lib/rexml/parsers/treeparser.rb:22:in `parse'
/Users/user/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rexml-3.3.2/lib/rexml/document.rb:448:in `build'
/Users/user/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rexml-3.3.2/lib/rexml/document.rb:101:in `initialize'
/Users/user/projects/active_merchant/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb:481:in `new'
/Users/user/projects/active_merchant/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb:481:in `legacy_parse'
/Users/user/projects/active_merchant/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb:456:in `parse'
/Users/user/projects/active_merchant/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb:663:in `commit'
/Users/user/projects/active_merchant/lib/active_merchant/billing/gateways/paypal/paypal_recurring_api.rb:33:in `recurring'
/Users/user/projects/active_merchant/test/unit/gateways/paypal_test.rb:400:in `block in test_failed_create_profile'
     397:   def test_failed_create_profile
     398:     @gateway.expects(:ssl_post).returns(failed_create_profile_paypal_response)
     399:     response = assert_deprecation_warning(Gateway::RECURRING_DEPRECATION_MESSAGE) do
  => 400:       @gateway.recurring(@amount, @credit_card, description: 'some description', start_date: Time.now, frequency: 12, period: 'Month')
     401:     end
     402:     assert_instance_of Response, response
     403:     assert !response.success?
/Users/user/projects/active_merchant/test/test_helper.rb:106:in `assert_deprecation_warning'
/Users/user/projects/active_merchant/test/unit/gateways/paypal_test.rb:399:in `test_failed_create_profile'

Any idea how to fix this?

@raymzag
Copy link
Contributor

raymzag commented Jul 18, 2024

submitted my attempt #5181 to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants